Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simpler Variable Transfer

Status
Not open for further replies.

Deltaflyer

Programmer
Oct 11, 2000
184
GB
Just out of curiousity and a desire to type a little less, i am using ASP, and am looking for an easier way to pass variables from vbscript to jscript. At the moment i am using a form and calling

<form name=formname>
<input type=hidden name=fieldname value=value>
</form>
...
...
...
<script language=javascript>
var variable = document.formname.fieldname.value
</script>


is there an easier way to get the variable in without doing an invisible form.

DeltaFlyer ;-)

DeltaFlyer - The Only Programmer To Crash With Style.
 
if you are using ASP, you can change it to this:

<script language=javascript>
var variable = &quot;<%=valuefromasp%>&quot;
</script>
jaredn@eae.net -
 
Cheers jared. Perfect. DeltaFlyer ;-)

DeltaFlyer - The Only Programmer To Crash With Style.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top