| | |
Using Javascript in seperate file.
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Oct 2009
Posts: 31
Reputation:
Solved Threads: 3
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.
My styleScript.js class:
Is there anything I need to do to have my html access this javascript function that exists in a separate file??
html Syntax (Toggle Plain Text)
<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:
javascript Syntax (Toggle Plain Text)
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??
•
•
Join Date: Oct 2009
Posts: 31
Reputation:
Solved Threads: 3
0
#2 19 Days Ago
Forgot that you need script references in the header. Duh.
HTML Syntax (Toggle Plain Text)
<head runat="server"> <title>Welcome</title> <link rel="stylesheet" type="text/css" href="style.css" /> <script type="text/javascript" src="styleScript.js"> </script> </head>
![]() |
Similar Threads
- how to input file using javascript activeX (JavaScript / DHTML / AJAX)
- How to synchronize a file upload with an insert in MySQL through Javascript-AJAX-PHP? (JavaScript / DHTML / AJAX)
- how to get values through javascript and pasted in batch file (JavaScript / DHTML / AJAX)
- Accessing control from an aspx page to a seperate .vb class file (ASP.NET)
- Combining CSS and Javascript files into single HTML file [HELP NEEDED] (JavaScript / DHTML / AJAX)
- IE6 Vs IE7 JavaScript Problem.. Help Please... (JavaScript / DHTML / AJAX)
- Ajax javascript test if image file exists (JavaScript / DHTML / AJAX)
- convert a file containing javascript to aspx (Community Introductions)
- Modifying head tag of parent file. (C#)
Other Threads in the ASP.NET Forum
- Previous Thread: IE can not display the web page ..?
- Next Thread: Urgent:Encryption
| Thread Tools | Search this Thread |
.net activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net box browser button c# cac checkbox click commonfunctions control css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock deployment development dgv dialog dropdownlist dynamic dynamically edit embeddingactivexcontrol expose fileuploader fill findcontrol flash formatdecimal formview gridview gudi iframe iis javascript listbox login microsoft mono mouse mssql multistepregistration news novell numerical objects opera panelmasterpagebuttoncontrols radio redirect registration relationaldatabases reportemail rotatepage save schoolproject search security sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice xsl youareanotmemberofthedebuggerusers





