2009/8/16 Kathleen Borja <[email protected]>: > How can I display the selected value of the option using PHP? > > For example I have this code: > > <script language=javascript> > function sevent() > { > var xx = document.xx.sbox; > > if(document.xx.sbox.selectedIndex != 0) > alert("selected is "+xx.selectedIndex); > else alert("None is selected"); > } > </script> > > <form name=xx> > <select name=sbox onChange="sevent()"> > <option value="default">Select Option</option> > <option value="option 1">option 1</option> > <option value="option 2">option 2</option> > </select> > </form> > > Here, it prompts whatever option you select. What I wanted to do is to display > the value of the selected option using PHP. How can do it? > $wgRequest->getVal( 'sbox' ) will return the selected value. <select>s are no different from textboxes in this respect.
Roan Kattouw (Catrope) _______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
