methods - this.form.submit() pass the value to the url -


i have script.

<form method="get">   <select name="report" onchange="this.form.submit()">     <option value="data1">data1</option>     <option value="data2">data2</option>   </select> </form> 

i want pass value of selected , add value current url(see url below).

test.php?link=partners&projectid=value&clientid=value 

something ;

 test.php?link=partners&projectid=value&clientid=value&type=data1 

change form this:

<form method="get" action="test.php">   <select name="report" onchange="this.form.submit()">     <option value="data1">data1</option>     <option value="data2">data2</option>   </select>   <input type="hidden" name="link" value="partners">   <input type="hidden" name="projectid" value="value">   <input type="hidden" name="clientid" value="value"> </form> 

you have use hidden type input form fields.

note: may have change name of select tag report type mentioned in question.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -