I'm trying to do something very simple...just access a JavaScript function that exists in a separate file but I can't seem to get it to work.

<form id="form1" runat="server">
    <script type="text/javascript" src="styleScript.js"></script>   
    <div id="container" class="container">
  
 <button id="button1" onmouseover="mouseOver('button1')" style="margin-left:900px;width:200px;background-color:Transparent;height:100px;margin-top:120px;">About Me</button>

       </div>
     </div>
     </div>          
</form>

My styleScript.js class:

function mouseOver(var b)
{
    //do stuff
}

Is there anything I need to do to have my html access this javascript function that exists in a separate file??

Forgot that you need script references in the header. Duh.

<head runat="server">
    <title>Welcome</title>
    <link rel="stylesheet" type="text/css" href="style.css" />
      <script type="text/javascript" src="styleScript.js">
      </script>   
</head>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.