It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

How to pass Dynamic values in Anchor tag

How to pass Dynamic values in Anchor tag

Postby PraveenAnekalmat on Fri May 04, 2007 9:59 am

Hi Everyone..

Please observe the below code

function fun(){
for(i = 1; i < = j; i++){
select = document.forms['MessageNew'].userId.options[i].value;
selection[i] = '<a href="javascript:assignValue(select);"> + select + </a>';
}
}

Assume j = 10, looping will happen for 10 times and 10 links will appear.
Let us assume value of 'select' is 'ABCD' when i = 1 and at i = 10, value of select will be 'XYZ' . Observe that in href we are calling one javascript function assignValue(select) and passing select in that. This javascript will be called when i click the link, even i click link number 1, XYZ will be passed to the assignValue() since looping is completed. But i need ABCD to be passed when i click link 1 and the respective values should be passed for link2,link3...,link10.
I hope you got my prob..Please help me how can i approach the solution.
Thanks a lot...
:?:
PraveenAnekalmat
 
Posts: 4
Joined: Fri May 04, 2007 9:51 am

Who is online

Users browsing this forum: No registered users and 9 guests