alert() from JavaScript in uBot Studio?

Write the reason you're deleting this FAQ

alert() from JavaScript in uBot Studio?

I'm using uBot to create a new bot and I have a lot of javascript in it. When a user clicks a link I have an onclick event:

<a href='#' onclick=\"myjavascriptfunction(); return false;\">my link</a>

The problem I'm facing is that it appears my function isn't being called. I wanted to add an alert in the function to see if it was being called. I did and it didn't work.

How do I generate an alert or popup from within uBot studio using Javascript?


Please login or sign up to leave a comment

alerts are disabled by default in uBot. They are actually closed as soon as they popup or something like that so you can never see them. The same is true for other popup/open comments. Instead, you can use the uBot function alert() instead of the javascript function. Here is how to execute the uBot command with a custom text:
ubot.runScript(\'alert(\"my custom alert\")\');

I tested this in a function that kicked off after a click on a link. It worked without flaw. 

Are you sure you want to delete this post?