|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
reading asp variables from javascript
is there a way to pass a variable from an asp page to a function included in js file??
__________________
I was born upon the sky where the wind flew free and there was nothing to stop the light of the sun... |
|
#2
|
|||
|
|||
|
Yes
You can just pass the value of the variable not the variable itself.
You just have to make a your function in javascript with a paramètre like function showVariableValue(strVariableValue) { alert(strVariableValue); } And Call it like Response.Write "<script language= ""javascript"">" Response.Write "showVariableValue(" & Your Variable & ")</script>" |
|
#3
|
||||
|
||||
|
or you just do this:
function somethingOrOther () { var firstvar = <%= varOne %> var lastvar = <% varOneMillion %> } |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > reading asp variables from javascript |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|