Jump to content

Automating website with Ajax


phinney
 Share

Recommended Posts

For the past couple months I've been working on a program for the site Vampirefreaks.com to autmatically invite members to a specific usergroup.

I finally got everything working properly when the webmaster changed how the website invites

You used to have to click an invite button, then a new window would pop up

The program worked that way.

Now however, the webmaster made an ajax code to simply embed the page that used to pop up into the first page(look at the pictures)

Posted Image

This is the first page that, clicking on the "invite" button used to open up a new window, now it does this:

Posted Image

How would I get my program to wait for this ajax control to load up before clicking on the "Submit" button in that window?

Thanks for any help you guys can give me

Link to comment
Share on other sites

I may be mis-reading the FFLoadWaitASYNC code, but it appears to be triggered by the text in the status bar. AJAX may not necessarily update the status bar text during processing. If I'm mis-representing that functionality, my apologies in advance.

I would write a function to wait until the Submit button has certain attributes, i.e. 'display=block'.

I would determine these attributes through the use of the IE Developer toolbar (for IE) and/or Firebug (for FF).

When we wait for the button to have these attributes set, we can be reasonably assured that the script can continue.

Link to comment
Share on other sites

I may be mis-reading the FFLoadWaitASYNC code, but it appears to be triggered by the text in the status bar. AJAX may not necessarily update the status bar text during processing. If I'm mis-representing that functionality, my apologies in advance.

Yes I know that _FFLoadWaitASYNC not always works (because that's why it isn't called _FFLoadWaitAJAX :D ) with AJAX, but I think I can check it with something like this:

https://developer.mozilla.org/en/Gecko-Specific_DOM_Events#MozAfterPaint

in one of the next versions.

I would write a function to wait until the Submit button has certain attributes, i.e. 'display=block'.

I would determine these attributes through the use of the IE Developer toolbar (for IE) and/or Firebug (for FF).

When we wait for the button to have these attributes set, we can be reasonably assured that the script can continue.

Was this more a suggestion or a question for an example?

An example I've made some times ago -

every time you click on the button, the script fills the inputs:

http://autoit.de/index.php?page=Thread&postID=86027#post86027

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...