faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

82 of 149 people (55%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How do I pass ASP Variables to a Javascript function?

Apr 5th, 2008 20:16
ha mo, Jean-Bernard Valentaten, steven mac,


Now that is rather trivial.
Either you pass the ASP-Vars to JS-Vars:
<script language="JavaScript">
  var myVar = <%=ASPVar%>
</script>
or you place them in the function call:
<a href="someUrl" onmouseover="doSomeThing(<%=ASPVar%>);">blabla</a>
HTH
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com