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 3 of 3
  1. #1
    New Coder
    Join Date
    Dec 2009
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Random Page title script issue

    This script isnt working. Im not sure what im doing wrong. forgive me i havent programmed in javascript before.


    titles.js
    Code:
    <script type="text/javascript" language="javascript">   
        <!--//  
     function random_Title(){
     if (parseInt(navigator.appVersion) >= 4) {  
            var num = 3;  
            var rantitle = new Array(num+1);  
            rantitle[1] = "Random Title1";  
            rantitle[2] = "Random Title1";  
            rantitle[3] = "Random Title1";  
            ranNumber = parseInt(num * Math.random() + 1);  
            document.title = rantitle[ranNumber];  
        }  
        //-->   
     }
    </script>
    html page
    Code:
    <html>
    <head>
    
    <script type='text/javascript' src='http://www.flashmajic.com/Google/titles.js'></script>
    <script>
      document.title =   random_Title() ;  
    </script>
    </head

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,017
    Thanks
    203
    Thanked 2,538 Times in 2,516 Posts

  • #3
    New Coder
    Join Date
    Dec 2009
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks that worked perfect.


  •  

    Posting Permissions

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