Click to See Complete Forum and Search --> : Radio Button + Submit = Action


snipingkid
04-03-2007, 02:44 PM
Hey Everyone.

I would like to do something like this:

I am making a search box on my site. I want it to be able to search into wikipedia.org, google.com and my own site. I already have all of these codes done. WIKI and Google are functions and my own site work similarily. I want to have 3 radio buttons that my users can choose. They could then click submit/search and the action of that code would happen.

Ex.
Keyword: Bomb
Radio button: Wikipedia="checked"
Refresh to : wikipedia.org/wiki/Bomb

How could I do this? I was thinking of using the IF/THEN/ELSE statement but I dont know if it works on here... although it should.

Something like

If RadioButton Wiki = "checked"

Then Void myfonction1();
Void myfonction2();

Could anyone work something like this? Thank you.

snipingkid
04-03-2007, 04:12 PM
Alright I'm gonna make this simpler.

What is the button called in an if statement?

I want something like this
<script language="javascript" type="text/javascript">

If (Google="checked"){
appendURL()
}
Else {
appendURL2()
}
End If

</script>

Then, IF that is correct, what should the submit button look like?

Thanks

Watts
04-04-2007, 11:07 AM
http://javascript.internet.com/navigation/in-page-search-option.html

you've got the right idea...

snipingkid
04-04-2007, 05:21 PM
:) That's perfect. I'll base myself off of that.

Thanks.:D