Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
01-15-2003, 02:20 AM #1
- Join Date
- Oct 2002
- Oakland, CA
- Thanked 0 Times in 0 Posts
reload page w/ querystring using onclick
I have a page with a form on it.
The first field is named Search Type, with 2 radio button options, A and B.
A is the default, however when a user clicks B, a different set of search criteria follows beneath.
My thinking is to add a querystring (page.asp?SEARCH_TYPE=B) with a function then reload the page, collect the variable and carry on.
Here's what I have so far:
SEARCH_TYPE = "A"
If Request.QueryString("SEARCH_TYPE") <> "" Then
SEARCH_TYPE = Request.QueryString("SEARCH_TYPE")
<form action="page.asp" method="post" name="form1">
<input type="RADIO" name="SEARCH_TYPE value="A"<% If SEARCH_TYPE = "A" Then Response.Write " checked" End If %> onClick="A_on();">A<br>
<input type="RADIO" name="SEARCH_TYPE" value="B"<% If SEARCH_TYPE = "B" Then Response.Write " checked" End If %> onClick="B_on();">B
*** I used this method successfully elsewhere, but it's not working here. The difference is that on the successful one the form submits to a different page, and not to itself like this one does.
Is there some other way to "reload a page" using those functions instead of "submitting" it like they currently do?