Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Dec 2003
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Page loading done

    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

  • #2
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    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

    Code:
    <input type="text" onfocus="this.blur();">
    Basscyst
    Helping to build a bigger box. - Adam Matthews

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    http://javascript.about.com/library/.../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?

  • #4
    New to the CF scene
    Join Date
    Dec 2003
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would like to disable the whole page (input fields and links) with one call if possible.

    Thanks

    Steve

  • #5
    Regular Coder
    Join Date
    Jul 2003
    Location
    Massachusetts
    Posts
    472
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •