Reputation: 2290
I need to create an HTML drop down that will display flags of countries. The only solutions i found was with jquery and it generated a list of links from a select box.
The problem is i don't want to link the user to a different page , i want to later use the selected value on form submit (like a simple select box)
How can i do that ?
Thanks
Upvotes: 2
Views: 18835
Reputation: 8458
Something like this should do the trick:
$(".myFlagItem").click(function() {
$(".myHiddenInputBox").val($(this).attr("flagValue"));
})
Upvotes: 0
Reputation: 11052
I've used this plugin in the past - hopefully it does the trick for you (unless it's one you've already tried):
http://www.marghoobsuleman.com/jquery-image-dropdown
Upvotes: 3
Reputation: 721
you can get the value you need from the jquery control and put it in a hidden field in the form you want to submit.
Upvotes: 0