onchange dropdown add parameters to url in inputbox

prepppaprx

New Member
i am designing affiliate program, in which each user has his own link-code aka tracking url.and i am willing to add extra parameters to it depending on the drop down selection which will be different landing pages.e.g.original url \[code\]http://www.google.com/?tracker=blah1\[/code\]and if user selects value from down the url should be like \[code\]http://www.google.com/?tracker=blah1&queryid=1\[/code\]i am using this code for displaying the url to the end user in the input box set as readonly.\[code\]<input size="100" type="text" value="http://stackoverflow.com/questions/15629171/<?=$url;?>" readonly> &nbsp;- &nbsp;<a target="_blank" href="http://stackoverflow.com/questions/15629171/<?=$url;?>">Link</a></b>\[/code\]theres gonna be two drop down like these.\[code\]<select name="niche"><option value="http://stackoverflow.com/questions/15629171/0" label="choose one">choose one</option><option value="http://stackoverflow.com/questions/15629171/&queryid=1" label="option 1">option 1</option><option value="http://stackoverflow.com/questions/15629171/&queryid=2" label="option 2">option 2</option><option value="http://stackoverflow.com/questions/15629171/&queryid=3" label="option 3">option 3</option><option value="http://stackoverflow.com/questions/15629171/&queryid=4" label="option 4">option 4</option><option value="http://stackoverflow.com/questions/15629171/&queryid=5" label="option 5">option 5</option><option value="http://stackoverflow.com/questions/15629171/&queryid=6" label="option 6">option 6</option></select>\[/code\]by selecting option 1 it should add &queryid=1 to the end of the url.if none is selected then no change will be there.\[code\]<select name="landingpage"><option value="http://stackoverflow.com/questions/15629171/0" label="choose one">choose one</option><option value="http://stackoverflow.com/questions/15629171/&cid=1" label="landing 1">landing 1</option><option value="http://stackoverflow.com/questions/15629171/&cid=2" label="landing 2">landing 2</option></select>\[/code\]by selecting landing 1 will add &cid=1 to the end of the url.if none is selected then no change will be there.so how do i do this ?Thanks for your time.
 
Back
Top