HTML/CGI: When linking, append variable/value pair instead of replacing? -


if on page foo.php have link <a href=?bar=baz>click</a>, link bring user foo.php?bar=baz. if user on foo.php?bar=baz, , want link them foo.php?bar=baz&qux=derp, there way express in href attribute of tag? if tag <a href=?qux=derp>click</a> user directed foo.php?qux=derp instead of foo.php?bar=baz&qux=derp.

thanks!

i tagged cgi because think ?bar=baz part of url more related towards that, please correct me if wrong.

there no way so. need parse current url , add new parameter appropriately.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -