49 users online (1 members and 48 guests)  


  Results 1 to 1 of 1

Related

  1. Passing PHP variable to Javascript    Forum: PHP Forum
    Replies: 5
  2. convert a perl variable to javascript variable    Forum: Javascript Forum
    Replies: 0
  3. Replies: 5
  4. Parsing javascript variable to PHP    Forum: PHP Forum
    Replies: 0
  5. Parsing javascript variable to PHP    Forum: Javascript Forum
    Replies: 0
  1. #1
    Crlaozwyn's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2007
    Posts
    1

    Export Javascript variable into meta tag?

    Hi there. I'm trying to create a page that will refresh at a random interval. I'd been using meta tags to refresh and then found javascript to come up with a random interval between two numbers. Of course I can't simply use the javascript variable in the meta tags... Can anyone help? Here's a copy of the code I have so far:

    Code:
    <html>
    
    <head>
    <script language="JavaScript">
        var now = new Date();
        var secs = now.getSeconds();
        var raw_random_number = Math.random(secs);
        var random_number = Math.round(raw_random_number * (5)+5);
    </script>
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta http-equiv="refresh" content="random_number">
    <title>New Page 1</title>
    </head>
    <FRAMESET COLS="*,1">
    <FRAME SRC="http://ahfb2000.com">
    <FRAME>
    </FRAMESET>
    </HTML>
    Last edited by vinyl-junkie; 04-09-2007 at 09:11 PM. Reason: Added code tags



Tags for this Thread