Reply
Why does selected index NOT maintain position
Old 06-12-2007, 10:44 AM Why does selected index NOT maintain position
numbenator's Avatar
Ultra Talker

Posts: 441
Location: London
Trades: 0
Hi,

I am usng a select drop down list with onchange which renders a new part of a form depending on users choice.

<select name="blockType" id="blockType" onChange="checkBlockType(this)" >

chechBlockType calls a function that uses xmlHTTPRequest which renders the necessary form part.

My problem is that blockType does not maintain it's selected index. It returns to 0 index which is "Select block type ...." value 0. This is messing up my code when form submited as I require the blockType to have value selected. As i would expect , any attempt to re select my choice, merely kicks in the onchange again and again resets.

Any ideas would be appreciated.

cheers
__________________
www.mastech-solutions.com
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
 
When You Register, These Ads Go Away!
Old 06-12-2007, 11:16 AM Re: Why does selected index NOT maintain position
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,942
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Where's the code?
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 06-12-2007, 11:20 AM Re: Why does selected index NOT maintain position
numbenator's Avatar
Ultra Talker

Posts: 441
Location: London
Trades: 0
well it's multi part and here.
Whicdo you inquire about? The html, js or php?
__________________
www.mastech-solutions.com
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
Old 06-16-2007, 04:26 PM Re: Why does selected index NOT maintain position
chrishirst's Avatar
Super Moderator

Posts: 26,528
Location: Blackpool. UK
Trades: 0
you will have to send the value back when the page reloads.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | Crowded Nightclub? | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-16-2007, 04:28 PM Re: Why does selected index NOT maintain position
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,942
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
The page that is giving you the problem. HTML and JS is fine in this case.
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Reply     « Reply to Why does selected index NOT maintain position
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.09633 seconds with 13 queries