SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Oct 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    The page doesn't stop loading in FF.

    I have a very simple function. But when it is executed in Firefox the page doesn't stop loading. It works fine in IE6, IE7 and Opera.

    Here is the code. Very simple as you can see, though it doesn't work in FF.

    HTML Code:
    <html>
    
    <head>
    
    	<script type="text/javascript">
    		function writeTxt() {
    			document.write('Text');
    		}
    	</script>
    
    </head>
    
    <body onload="writeTxt()">
    
    </body>
    
    </html>

  2. #2
    SitePoint Guru
    Join Date
    Apr 2006
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    function writeTxt() {
    document.write('Text');
    document.close();
    }

  3. #3
    SitePoint Member
    Join Date
    Oct 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mrhoo View Post
    function writeTxt() {
    document.write('Text');
    document.close();
    }
    Thank you.


Bookmarks

Posting Permissions

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