/    Sign up×
Community /Pin to ProfileBookmark

Onclick Radio button reload the page with the radio button value

Hi,

i’ working on project of bridal shoes.
i want to search shoes by brand,style,attributes and heels.
every search category having radio buttons.all are loading from the database.

when i click on the radio button it should display result according to selected radio button.
the search form like below.

[B][COLOR=”Red”]Brand [/COLOR] [COLOR=”Green”]Style [/COLOR] [COLOR=”magenta”]Attributes [/COLOR] Heels[/B]
[COLOR=”Red”]Brand 1[/COLOR] [COLOR=”DarkOliveGreen”]Style 1[/COLOR] [COLOR=”Magenta”]Att1 [/COLOR] 1 inch
[COLOR=”red”]Brand 2 [/COLOR] [COLOR=”darkolivegreen”]Style 2[/COLOR] [COLOR=”magenta”]Att2 [/COLOR] 2 inch
[COLOR=”red”]Brand 3[/COLOR] [COLOR=”darkolivegreen”]Style 3 [/COLOR] [COLOR=”magenta”] Att3 [/COLOR] 3 inch

it’s like filtering.
[COLOR=”DarkRed”]if i select brand 1 ,brand 1 result should dispaly.If i select brand 1 and style 2,then it should dispaly all the shoes in Brand 1 Style 2.[/COLOR]

this is the main part of my project.i’ m stuck on here.
pls help me solve this.

Thanx,

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@welshAug 28.2009 — Well for the redirect for the radio buttons you could do something like
[code=html]<input type="radio" onclick="window.location='http://www.yourpage.com';" />[/code]
And to get it to display i suggest something for the link, you do like [B]yourpage.php?brand=brand1[/B] Then you do something like this on the page:
[code=php]if(isset($_GET['brand'])){
// Show & Do Stuff for Brand's
}[/code]

And possibly have each one the same so have the 2nd button add the [B]&style=style1[/B].

Keep in mind this is all using java redirect(so it auto does the update to what they choose) so you make have to make the links dynamic so you can select like Brand and Style. Or do something with sessions to check what was just set. Multiple ways to do.

You could also use a submit button so that it loads all 4. Same process but do as a form, and then post method and simply check to see what was posted over and display that way.

Hope these idea's help.
Copy linkTweet thisAlerts:
@madhu86authorAug 28.2009 — Thanx Welsh.
×

Success!

Help @madhu86 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.18,
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,
)...