DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   Using Javascript code in ASP.NET (http://www.daniweb.com/forums/thread20658.html)

rooparaj Mar 22nd, 2005 3:15 am
Using Javascript code in ASP.NET
 
Hi everybody,

I am facing problem in javascript.
I got javascript code for menu creation.
That code is saved as menu.jc file.
My Doubts are:
1) How do i use in my mainpage.aspx?
2) How do i create dll file for this javascipt file so that i can use it directly?

PLz its very urgent.

Thank you all
Roopa Raj

hollystyles Mar 22nd, 2005 6:29 am
Re: Using Javascript code in ASP.NET
 
Put this line in mainpage.aspx.

<script language="javascript" src="menu.js"></script>

You can't compile javascript to a dll, dll's are native code. Javascript is a scripting language and scripting languages are parsed and JIT compiled on the fly by an interpreter. In your case the interpreter is the Virtual Machine running in the browser or the Sun Java Runtime that is installed, depending on how the client is set up and what OS they are using.

rooparaj Mar 22nd, 2005 8:19 am
Re: Using Javascript code in ASP.NET
 
Thanks for the solution.


All times are GMT -4. The time now is 5:08 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC