User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 397,792 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,439 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

linking dynamically added drop down using javascript

Join Date: Oct 2006
Location: Sofia, Bulgaria
Posts: 135
Reputation: Rhyan is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 7
Rhyan's Avatar
Rhyan Rhyan is offline Offline
Junior Poster

Re: linking dynamically added drop down using javascript

  #4  
Mar 9th, 2007
Originally Posted by bhuvan83 View Post
but do u know the soln?


It looks like your buttons A2 and B2 copy exactly the code you used to create a1 and b1. Use an iteration to change id and names of the dynamically added buttons, so that your b button become b2, not b1.

it should look something like this
var iteration = lastButtonNameNumber + 1;
var new_a_ButtonName = 'a' + iteration;
var new_b_ButtonName = 'b' + iteration;

And then access the new b-button value using something like
document.form.new_b_ButtonName.value = ....

Hope you can figure it out by yourself.

Good luck.
" Of all the things I've lost,
I miss my mind the most...."
Mark Twain
Reply With Quote  
All times are GMT -4. The time now is 5:38 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC