...

View Full Version : Page loading done



stevek
12-19-2003, 08:55 PM
Is there a way to detect when a page is done loading (and displayed)? I would like to have a JavaScript function called when page has been completed.

Also is there a way disable all input fields on a page (using JavaScript).

You are probably wondering why I ask these question - to make a long story short, I am using a piece of software called "OpenThought" which allows a server to communicate to a browser through a hidden frame. It is pretty cool, but has a few issues I am trying to solve. Check it out http://openthought.net

Thanks

Steve

Basscyst
12-19-2003, 09:01 PM
Hello -

I don't know about the first part of your question you may be able to do somthing using setTimeout but as far as disabling input fields you can use



<input type="text" onfocus="this.blur();">


Basscyst

adios
12-19-2003, 09:04 PM
http://javascript.about.com/library/weekly/aa091701a.htm

Disabling...how granular do you want this to be (just form inputs?)

Also: you mention Netscape 4 in your documentation. How important is support for that?

stevek
12-20-2003, 05:14 PM
I would like to disable the whole page (input fields and links) with one call if possible.

Thanks

Steve

fredmv
12-31-2003, 10:13 AM
<script type="text/javascript">
//<![CDATA[
onload = function()
{
var e = document.getElementsByTagName('*') || document.all;

for(i=0; i<e.length; i++)
{
e[i].onfocus = function()
{
this.blur();
}

e[i].onclick = function()
{
return false;
}

if(typeof e[i].disabled != 'undefined') e[i].disabled = true;
}
}
//]]>
</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum