Skip to main content
Inspiring
May 2, 2006
Answered

Pass through Url

I have a form where the user has an option of clicking submit which submits the entire form or select a some abcdefg... which submits the selected alpha and passes through a URL. The problem now is that I want the user to select a radio button which tells me the DB they want to search.
How wiould I pass the value of the radion button through url to know the users seacr option?
I Need to put the value from the javascript in the URL and pass the Value to the next form
<a href="/admin/Leadsresult.cfm?search=a" onclick="return checkradio();">A</a>

This my script which I want to submit the value when user clicks the above
function checkradio()
{
var check =document.b.criteria.value;
if (check ==1)
{
document.b.checkoption.value ='Cp';
}
else
{
document.b.checkoption.value ='Cb';
}
document.form.action="sult.cfm";
document.form.submit();*/
}
This topic is closed to new replies. Start a new post to keep the conversation going.
Dan_BracukCorrect answer
Inspiring
May 3, 2006
Write two anchor tags instead of one. Append different variables to each, and display different text so that the user knows what the difference is.

7 replies

Dan_BracukCorrect answer
Inspiring
May 3, 2006
Write two anchor tags instead of one. Append different variables to each, and display different text so that the user knows what the difference is.
Translate
umuayoAuthor
Inspiring
May 3, 2006
Thats a good idea. Thnks.
Translate
Inspiring
May 2, 2006
It's just another form field. Pass it the same way you do the others.
Translate
umuayoAuthor
Inspiring
May 2, 2006
The form fields are not being submitted when you click on the hyperlinked data.

It only get submitted when you use the Submit button.
Translate
Inspiring
May 2, 2006
Why aren't you using a form? Not exactly sure what you are trying to do but you should do it using a form and dispense with the javascript. Try passing the form values using the method="get" in your form line. This will pass the values via the URL line.
Translate