Script errors when script element is placed in head tag

  •  01-13-2006, 10:49 AM

    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
View Complete Thread