I am a complete stranger to JS so forgive me please.
I wanted to include an image + text dropdown (combo box) on a page for language selection and I did using jquery and a plugin called msDropDown. What I don't know is how to make the page reload altering the $_SESSION["lang"] at the same time.
So far I've achieved something usefull like this:
<select name="languageSelector" id="languageSelector" style="width:150px;" onchange="window.location.href='<?php echo $HTTP_SERVER_VARS['PHP_SELF']; ?>?lang='+this.value;">
<option <?php if($_SESSION["lang"] == "en") echo "selected"; ?> value="en" title="../images/flags/lang-eng.gif">English</option>
<option <?php if($_SESSION["lang"] == "es") echo "selected"; ?> value="es" title="../images/flags/lang-esp.gif">Español</option>
but I preffer not to have that ?=lang=xx appended to the URL so I'm working just with $_SESSION and cookies. How should I change my "onchange" event to both reload the page and change the value in $_SESSION?
BTW here's my code for the plugin. I left it unaltered as I want it only to show the nice dropdown but maybe the events should be handled in there?
Any help would be appreciated.