Javascript works in Browser Preview but not when posted to the internet

Discussion in 'Javascript' started by larrylyons@rogers.com, Mar 29, 2006.

  1. Guest

    I have a javascript page that I used sucessfully on the net three years
    ago. I am trying to use it again and although it works fine when I
    preview it in a browser, It won't work when posted and downloaded from
    the internet. Firefox's Javascript Console show's that the variables I
    use in some document writes are not defined, however they are.
    EXAMPLE:
    <script Language ="javascript">
    document.write(twStr)
    </script>
     
    , Mar 29, 2006
    #1
    1. Advertising

  2. Guest

    Sorry. a lot of my question was cut off.
    The page can be seen at
    http://ca.geocities.com//GolfPool2006.html
    It works when I email it and it is open in a browser.
    I changed service providers could that make a difference?
    It works when I save it to the desktop and open it in a browser.
    It's driving me crazy. Any help would be appreciated.
    LL
     
    , Mar 29, 2006
    #2
    1. Advertising

  3. Lee Guest

    said:
    >
    >Sorry. a lot of my question was cut off.
    >The page can be seen at
    >http://ca.geocities.com//GolfPool2006.html
    >It works when I email it and it is open in a browser.
    >I changed service providers could that make a difference?
    >It works when I save it to the desktop and open it in a browser.
    >It's driving me crazy. Any help would be appreciated.
    >LL


    Firefox reports an unterminated string literal at line 205.
    The comments are breaking the line before the closing quote.

    203: function shWeek(){
    204: newWindow =
    window.open("","","scrollbars,resizable,height=300,width=200,top=5,left=50",align='center');
    205: var newContent = "<html><head><title>This Week</title></head>";
    newContent += '<body bgcolor="#ffffcc" leftmargin="1" align="center"
    topmargin="0" marginwidth="0" marginheight="0">
    206: <!-- following code added by server. PLEASE REMOVE -->
    207: <!-- preceding code added by server. PLEASE REMOVE -->'
    208: newContent += '<h3><center><a href="#" onClick="window.close()">Close
    Window</a> </h3></center></body></html>';
    209: newWindow.document.write(newContent)
    210: for (i = 0; i< twPoint.length; i++) {
    211: newWindow.document.write(twPoint[0]+" - "+twPoint[1]);
    212: newWindow.document.write("<BR>")
    213: }


    --
     
    Lee, Mar 29, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. EO
    Replies:
    4
    Views:
    436
    MWells
    Jan 26, 2005
  2. =?Utf-8?B?S2VpdGggSGFycmlz?=

    How do I preview a posted file?

    =?Utf-8?B?S2VpdGggSGFycmlz?=, Nov 14, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    598
    =?Utf-8?B?S2VpdGggSGFycmlz?=
    Nov 15, 2006
  3. =?Utf-8?B?RGlmZmlkZW50?=
    Replies:
    2
    Views:
    913
    =?UTF-8?B?R8O2cmFuIEFuZGVyc3Nvbg==?=
    Mar 28, 2007
  4. piet
    Replies:
    0
    Views:
    104
  5. gray_slp
    Replies:
    3
    Views:
    126
    Geoffrey Summerhayes
    Jun 27, 2007
Loading...

Share This Page