Web Page Changes Dynamically

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

Web Page Changes Dynamically

Postby cana » Fri Mar 19, 2010 5:18 pm

We have been playing with the DOM-based structural commands...pretty slick. But one question we have is, what about the case when the page changes dynamically? What then?
cana
 
Posts: 2
Joined: Wed Feb 24, 2010 10:43 am

Re: Web Page Changes Dynamically

Postby eValid » Tue Mar 23, 2010 1:30 pm

cana wrote:We have been playing with the DOM-based structural commands...pretty slick. But one question we have is, what about the case when the page changes dynamically? What then?

Thanks for the compliment!

On dynamically varying pages, there are two cases: (1) when the page initially takes a while to "settle down" because there is content still being delivered, and (2) when the page changes content and structure because of AJAX interactions.

Case (1): Here you simply use one of eValid's DOM-based "validate and synchronize on thus and so DOM property" commands. There are several variations of this. eValid will wait after the initial page load until the required feature is present in the page, and then your script can continue.

Case (2): This is more difficult and there appears to be no truly general solution to this, but what we have found in practice is that you can use a pair of commands to bracket the problem. The first command waits until something is NOT true on the page and the second command waits until something else IS true on the page.

That works as follows: The first command holds the AJAX-based page hostage until an internal DOM property signals that the JavaScript is going for some kind of an update. Once that begins -- signalled by some value changing away from the "stable page value" -- then the eValid test continues only after the second part of the "synchronization bracket" concludes.

Hope this helps!

The eValid Crew
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