Hi,
Anyone know how to pass value from 1 javascript to another javascript?
I wanted to pass 1 of the variable in A.asp to B.asp variable. is it possible to do it?
strRusty_gal 14 Unverified User
Recommended Answers
Jump to PostIn page a.asp you can keep one hidden form element, that will be passed to b.asp on submitting form. IN setvalue fuction you can set value for that field before submitting the form.
<script lang='javascript'> function setvalue() { document.getElementById('myfield ').value='newvalue'; document.frm.submit(); } </script> <form name=frm action=b.asp method=post> …
Jump to PostIn your b.asp code you may write
<% dim txt1 txt1=Request.Form("txt1") If txt1<>"" Then Response.Write("txt1=" & txt1) End If If Request.Form("txt1")<>"" Then Response.Write("txt2=" & Request.Form("txt1")) End If If Request.Form("myfield")<>"" Then Response.Write("myfield=" & Request.Form("myfield")) End If %>
All 5 Replies
urtrivedi 276 Nearly a Posting Virtuoso

stbuchok
strRusty_gal 14 Unverified User
urtrivedi 276 Nearly a Posting Virtuoso
strRusty_gal 14 Unverified User
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.