I have a select menu that iam using to change the laguage to this site.
Onchange iam trying to refresh the current page and pass the variables to the link or the adress.
this is the code ;
<form action='index.php' method="get" id='myForm'>
<select name="language" id="language" data-theme="b" style="float:right;" data-native-menu="false"
onchange="$.mobile.changePage( 'index.php', {
type: 'get',
data: $('form#myForm').serialize()} );">
<option value="eng">English</option>
<option value="ita">Italian</option>
<option value="esp">Spanish</option>
<option value="fr">French</option>
</select>
</form>
However as a result i get somethingh along the lines of ; index.php?language=ita&language=eng&language=eng&language=eng&language=eng
iam trying to get only index.php?language=ita
Also would it be possible to point the submit to the current page and not index.php
Thanks in adavanced to any one with the time to help me out
Gregor,
Try to use unobtrusive javascript instead of inline. something along the following lines may work:
untested, so no guarantees, but at least a little cleaner. Also, if you flesh out the requirement here (i presume to change page based on the select option values), I think we could find a solution pretty swiftly.