By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,605 Members | 2,137 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,605 IT Pros & Developers. It's quick & easy.

select box, selectedIndex problems

P: n/a
OK. Here goes...

I have a page in IE 6 that has a row with some input boxes and one
SELECT box. Below this row there is a button that onClick, it adds a
new row to the page dynamically. What it does actually is rewrites
those inputs and SELECTS on the page by first putting them in arrays
and then after writing the boxes, it puts them back where they go.
OK? OK.

So this SELECT box is my problem. The string that defines it, is
written from ASP on page load. It works no problem. Until you add a
row to the page. When a user has already chose a option there, and
then clicks ADD, it resets thier SELECT box to the first option, not
what they chose. I cannot figure out how to find thier choice and
keep it selected. The value of the option corresponds to the number
in the DB... but I can't very well look that up from the DB while the
page is running...

<option Value="231">0001</option> <option
Value="605">0002</option>...etc.

I need to somehow, I guess to retrive the selectedIndex from the
SELECT box, but I have been unsuccessful. I have also tried to put
the index value in a hidden box but also unsuccessfully. That is the
only ideas I have had, and they have not worked for me. Can anyone at
least point me in the right direction?

Thanks in advance!
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Perhaps this link inspires you:

http://lgwm.org/ozone/dynatable.htm

--
Elias
"Adam" <sh********@yahoo.com> wrote in message
news:88************************@posting.google.com ...
OK. Here goes...

I have a page in IE 6 that has a row with some input boxes and one
SELECT box. Below this row there is a button that onClick, it adds a
new row to the page dynamically. What it does actually is rewrites
those inputs and SELECTS on the page by first putting them in arrays
and then after writing the boxes, it puts them back where they go.
OK? OK.

So this SELECT box is my problem. The string that defines it, is
written from ASP on page load. It works no problem. Until you add a
row to the page. When a user has already chose a option there, and
then clicks ADD, it resets thier SELECT box to the first option, not
what they chose. I cannot figure out how to find thier choice and
keep it selected. The value of the option corresponds to the number
in the DB... but I can't very well look that up from the DB while the
page is running...

<option Value="231">0001</option> <option
Value="605">0002</option>...etc.

I need to somehow, I guess to retrive the selectedIndex from the
SELECT box, but I have been unsuccessful. I have also tried to put
the index value in a hidden box but also unsuccessfully. That is the
only ideas I have had, and they have not worked for me. Can anyone at
least point me in the right direction?

Thanks in advance!

Jul 20 '05 #2

P: n/a
WOW. Thats all I can say. Thats a really cool example. I think that
will help a lot.
Thanks much!
Adam

"lallous" <la*****@lgwm.org> wrote in message news:<bs***********@ID-161723.news.uni-berlin.de>...
Perhaps this link inspires you:

http://lgwm.org/ozone/dynatable.htm

--
Elias
"Adam" <sh********@yahoo.com> wrote in message
news:88************************@posting.google.com ...
OK. Here goes...

I have a page in IE 6 that has a row with some input boxes and one
SELECT box. Below this row there is a button that onClick, it adds a
new row to the page dynamically. What it does actually is rewrites
those inputs and SELECTS on the page by first putting them in arrays
and then after writing the boxes, it puts them back where they go.
OK? OK.

So this SELECT box is my problem. The string that defines it, is
written from ASP on page load. It works no problem. Until you add a
row to the page. When a user has already chose a option there, and
then clicks ADD, it resets thier SELECT box to the first option, not
what they chose. I cannot figure out how to find thier choice and
keep it selected. The value of the option corresponds to the number
in the DB... but I can't very well look that up from the DB while the
page is running...

<option Value="231">0001</option> <option
Value="605">0002</option>...etc.

I need to somehow, I guess to retrive the selectedIndex from the
SELECT box, but I have been unsuccessful. I have also tried to put
the index value in a hidden box but also unsuccessfully. That is the
only ideas I have had, and they have not worked for me. Can anyone at
least point me in the right direction?

Thanks in advance!

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.