/    Sign up×
Community /Pin to ProfileBookmark

Radio Button + Submit = Action

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.

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@snipingkidauthorApr 03.2007 — Alright I'm gonna make this simpler.

What is the button called in an if statement?

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

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

</script>[/CODE]


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

Thanks
Copy linkTweet thisAlerts:
@snipingkidauthorApr 04.2007 — ? That's perfect. I'll base myself off of that.

Thanks.?
×

Success!

Help @snipingkid spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.9,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...