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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

client vbscript variable ---> asp 1

Status
Not open for further replies.

loganswell

Programmer
Dec 28, 2000
111
GB
Hi,

How is it possible to send the value of a client side vbscript variable to an asp page? There doesn't seem to be a way of doing this using an html form.

All I want is to be able to click a "submit" type button an send the value of a variable to asp.

Can anyone help me please? Thank you :)
 
sure, on the receiving page, just say:
Code:
<%myASPVariableName = request.form(&quot;theElementName&quot;)%>

where &quot;theElementName&quot; is the name of the form element that has the value that you want to pick up on the form...

example of the form on the sending page:
Code:
<form action=post action=&quot;thePage.asp&quot; name=theForm>
  <input type=text name=theElementName>
</form>

hope it helps! :)
Paul Prewett
 
And then I read the title of your post...

in order to assign the client vbscript variable to the form element, just say...

<script language=vbscript>
document.theForm.theElementName.value = theValue
</script>
 
Thanks - that's wonderful - This has dogged me for ages!
 
Paul - I'd just like you to know that your reply was very helpful to me and has allowed me to finish off a project that I really wanted completed. Thank you again!

Jim
 
I see some members can take some time to say thank you

:) Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
That's great.

I'm glad it helped out. I'm sure I'll need some help soon, so keep an eye out for me. ;-)

paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top