Reputation: 1
I am using Joomla 3.6.5 and I want to make a drop down list in a page of my web site Joomla.
my scenario is:
I have 48 states, the user have to click his state in the list and then he will be redirect in other page which describe the content concerning his state.
After looking in the web, I find the extension SobiPro but it has only 30 link not more.
I am new in Joomla and I don't know how to do that.
Please help me for solve my confusion.
Upvotes: 0
Views: 956
Reputation: 25485
Here's a general solution that you could use on any site: https://codepen.io/panchroma/pen/pPQbxg
I have it working well on a Joomla site.
Add this javascript to your page
<script language="JavaScript" type="text/javascript">
function ChangeUrl(form) {
if (form.State.selectedIndex != 0) {
var url;
url = form.State.options[form.State.selectedIndex].value;
window.open(url, '_self');
}
}
</script>
Then manually build up your form
<form>
<select name="State" onchange="ChangeUrl(this.form)">
<option selected="selected" value="">Choose you State</option>
<option value="#state1">state1</option>
<option value="#state2">state2</option>
<option value="#state3">state3</option>
</select>
</form>
Hope this helps!
Upvotes: 1