-
Hi everyone,
Need Help
I know javascript can do it, I already get it. But now I want to using ASP.
I want to pass a variable using Radio buton via the byperlink, can I do that?
let say i have 3 radio button like below and I want to know which button I select and pass to asp2.asp page.
<Input type="radio" name="R1" value="V1">Test1
<Input type="radio" name="R1" value="V2">Test1
<Input type="radio" name="R1" value="V3">Test1
<A href="asp2.asp? ">Next</A>
At the asp2.asp i using the statement:
<% R1=request.querystring("R1")%>
Hope anyone of u can help me ASAP.
Need a sample code as well.
Thx in advanced,
:o Mac :)
-
I am assuming that you have the radio buttons in a form. You set the form method to GET, the action to "asp2.asp", then for your hyperlink make it a submit button (or if you want a picture you just:
<INPUT type="image" src="pathtoimage">)
-
Hyperlink
But how i oing to make the hyperlink like submit button.
Since my hyperlink just simply a text call "Next"
the htm code like:
<A Href="asp2.asp? >Next</A>
the above code cannot submit the variable right ?
So how, for image I know can.
DO response ASAP
:o Mac :)
-
I don't know if you can have just a text link instead of a submit button. If you don't mind having a button on the page, then you can put a submit button on <INPUT type="submit" value="Next">
Otherwise, you will have to use VBScript (or JavaScript):
You get value inside whatever inputs you have by using their name (document.formname.inputname)
If you want to do it this way then post what input types you have and what their names are (and the name of you form) and I can put something together for you.
-
u can do it
the only way to make a hyperlink a submit button is the following (you'll have to use javascript):
Code:
<a href="asp2.asp" onclick = "foo();">TextSubmit</a>
and then foo() would have the following line of javascript:
Code:
document.form1.submit()
goodluck!
dvst8
-
That's a whole lot easier than the way I know how to do it.
-
yeah no kidding!
i use this all the time now...
/d8
-
Hyperlink
Since like there is no way to use hyperlink as a submit button. The only way is using JavaScript.
Any way, thx to all of u.
If u find there is the way, do send to me. I'm very appreciate it.
:o Mac :)