Script errors when script element is placed in head tag

Last post 02-02-2006, 9:39 AM by Nico64. 2 replies.
Sort Posts: Previous Next
  •  01-13-2006, 10:49 AM 14717

    Script errors when script element is placed in head tag

    HI
     
    Can you please explain to me why I am getting client script  errors when I use the following code :

    <HTML>
          <HEAD>
                <title>WebForm1</title>
                <script language="vbscript">
                      msgbox "1"     
                </script>
          </HEAD>
          <body MS_POSITIONING="GridLayout">
                <form id="Form1" method="post" runat="server">
                      <ce:Editor id="Editor1" runat="server"></ce:Editor>
                </form>
          </body>
    </HTML>

    I get error message like : expected end of statement and cannot use partheses when calling a sub. When I remove the SCRIPT element from the head element everything works fine. Also when I place the script element behind the editor element it also works fine. I want to add SCRIPT to the head element because in my opinion that's the place to store these things.

    Hope you can help me out here.

    thanx
    NIco
  •  01-29-2006, 12:46 AM 15283 in reply to 14717

    Re: Script errors when script element is placed in head tag

  •  02-02-2006, 9:39 AM 15490 in reply to 15283

    Re: Script errors when script element is placed in head tag

    That is correct because there is nog script tag in the head section. If you place the script tag in the head section the error will pop up. Hope you have resolution
View as RSS news feed in XML