| | |
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 20 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 2.0 3.5 ajax alltypeofvideos appliances asp asp.net beginner box browser businesslogiclayer button c# cac checkbox class commonfunctions compatible content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv gridview gudi iis javascript list listbox login menu microsoft mouse mssql nameisnotdeclared news novell numerical opera order panelmasterpagebuttoncontrols problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security serializesmo.table sessionvariables silverlight smoobjects software sql sql-server sqlserver2005 ssl tracking treeview validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming webservice wizard xsl youareanotmemberofthedebuggerusers





