...

View Full Version : Pass value in HREF



NRastogi
12-23-2003, 07:14 PM
Hello all,

In an JavaScript function, I am getting some value into a variable called procid.

Down the page, I have this link <a href="/abc/xyz.htm">

I would like to pass the value of this variable procid as an parameter in the href...so it would look like

<a href="/abc/xyz.htm?procid=1234"> where 1234 is the actual value from the function.

Thanks a lot,

NRastogi

nolachrymose
12-23-2003, 07:22 PM
<a href="#" onclick="location.href = '/abc/xyz.htm?procid=' + myFunction(); return false;">

Hope that helps!

Happy coding! :)

sage45
12-23-2003, 07:52 PM
Also you can use this resource if you have any further questions...

http://www.javascriptkit.com/javatutors/send1.shtml

-sage-

NRastogi
12-23-2003, 08:18 PM
Thanks so much guys...

Regards, NRAstogi



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum