View Full Version : "pass arguments"

11-07-2006, 09:20 AM

I have 10 web links on my index but at the top my page is there one <input type="text" name="myurls"> So I want to create an effect like the following:

<a href="http://www.yahoo.com">Yahoo!</a> <a href="#">click add</a>

When some user press to the "click add" link the url link http://www.yahoo.com is passed on <input type="text" name="myurls"> and if the same user click on other link the present link disappears and the new is writing.

Regards and thanks for all help/helpers.:thumbsup:

Mr J
11-07-2006, 09:48 AM
You could try something llike this

<script type="text/javascript">

function addUrl(v){


return false



<a id="lnk1" href="http://www.yahoo.com">Yahoo!</a> <a href="#" onclick="return addUrl('lnk1')">click add</a>
<a id="lnk2" href="http://www.codingforums.com">Codingforums.com</a> <a href="#" onclick="return addUrl('lnk2')">click add</a>

<form name="myform">
<input type="text" name="myurls" style="width:200px">