Discussion - moving content created by programmatic objects

There are various levels of sophistication of course and I'm sure our products will move up the ladder as time allows. If we're doing much parsing of script content at all, we should be able to detect the action of setting the value of, usually, a form control within a loop. Often this will be associated with a window.setTimeout() function. For instance, something like:

do {setTimeout("document.forms[0].elements[0].value='Scrolling Text'", 50);} while true;

This syntax might not be 100% correct but is the general idea (not to mention that as the text doesn't change in each pass it wouldn't actually scroll in this example). The important feature is setting the value of a form control or possibly the content of a DIV section in an unterminated loop.

Or, equally or more likely, would be a simpler syntax using the setInterval function, which doesn't require a loop:

setInterval(document.forms[0].elements[0].value='Scrolling Text'", 50);

Here, the important feature is that setting the value of the form control is an argument to the setInterval function rather than a statement in the loop, but these two should be equivalent and we could check for both. Of course, the statement that updates the value is most likely to be a function the user has declared elsewhere, so we would have to know to look at that function and see if it does that, so that's another level of complexity in reading the script. But if we're interested in it it's possible.

Michael Cooper - Oct. 28, 1998

Modified $Date: 2000/11/08 08:17:33 $