Do you sync on the file or on some element or what?

Applying eValid to AJAX applications that require advanced DOM-based methods.

Do you sync on the file or on some element or what?

Postby index9 » Fri Aug 28, 2009 4:06 pm

How do you arrange for eValid to wait until a particular
JavaScript library is fully loaded before continuing?
Do you sync on the file or on some element or what?
index9
 
Posts: 10
Joined: Wed Aug 26, 2009 3:32 pm

Re: Do you sync on the file or on some element or what?

Postby eValid » Fri Aug 28, 2009 5:47 pm

index9 wrote:How do you arrange for eValid to wait until a particular
JavaScript library is fully loaded before continuing?
Do you sync on the file or on some element or what?


What you are asking seems to be: How do you make sure that a particular JavaScript file is fully loaded in an AJAX application?

Probably you need to do this sync step because the AJAX application takes a long and variable time to complete this download. This is not unusual at all; we have seen some JavaScript files of upwards of 1.5 MBytes, and these take several tens of seconds to arrive, and maybe even several minutes depending on server load.

The faility in eValid to synchronize this is to add a SynOnDocumentProperty command to the script, where the parameters of the command refer to a DOM property that is exists only AFTER the JavaScript file has finished. You can find such an element by looking at the "Script" attribute in the pure HTML and then looking for the name in the DOM using the PageMap.

Also, you may want to use the simpler sync that just waits for a specific attribute name to show up.

The details on this vary with the application, but we have used this very successfully in a number of different functional test development projects.

The eValid Team
eValid
 
Posts: 2395
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to AJAX Applications & DOM Processing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons