Pass Dynamic values in Anchor Tag

This is a discussion on "Pass Dynamic values in Anchor Tag" within the JavaScript Forum section. This forum, and the thread "Pass Dynamic values in Anchor Tag are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 4th, 2007, 10:19
New Member
Join Date: May 2007
Location: Bangalore
Age: 25
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Pass Dynamic values in Anchor Tag

Hi Everyone..

Please observe the below code
Code: Select all
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...

Last edited by karinne; May 4th, 2007 at 11:58. Reason: Please use [code]...[/code] tags when displaying code!
Reply With Quote

Reply

Tags
anchor, dynamic, values

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
highlight anchor? ktsirig Web Page Design 1 Apr 28th, 2008 12:54
What do I need to know to anchor a nav bar? Pherdnut Web Page Design 2 Nov 22nd, 2006 21:21
Setting Form Values to Previously Entered Values masonbarge PHP Forum 6 Oct 17th, 2006 17:36
Explode Anchor Sheepymot PHP Forum 2 Jul 23rd, 2005 13:24
Assign string values to integer values of a session variable Andy K Classic ASP 1 Jul 13th, 2005 08:29


All times are GMT. The time now is 19:13.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43