Closed Thread Icon

Topic awaiting preservation: show/hide textbox onChange Pages that link to <a href="https://ozoneasylum.com/backlink?for=22845" title="Pages that link to Topic awaiting preservation: show/hide textbox onChange" rel="nofollow" >Topic awaiting preservation: show/hide textbox onChange\

 
Author Thread
slim___shady
Nervous Wreck (II) Inmate

From: canada
Insane since: Aug 2002

posted posted 08-07-2004 00:52

Will someone please help me out with this?

What I am trying to do is to show a textbox if the user selects "Other" from the select dropdown; and hide the textbox if they select something else. It works in Netscape but not in IE. What do I need to change/add to make it work in IE?

Part 2 is that I would like the focus to automatically go to the new textbox if they select "Other".

Thanx for any input.

<img src="http://www24.brinkster.com/nepdude/temp.gif">

BillyRayPreachersSon
Nervous Wreck (II) Inmate

From: London
Insane since: Jul 2004

posted posted 08-07-2004 12:55
quote:
What do I need to change/add to make it work in IE?



Without seeing your original source, it would be hard to comment on that, don't you think?

Normally, however, these cross-browser issues with select boxes come when programmers try to shortcut things and use lazy scripting methods that seem to be IE only (like referring to the name or ID of an element without the correct prefix). Try referring to your select box like this:

code:
document.forms[0].elements['selectBoxName']



and you should get round most cross-browser issues.

As I said, however, post your code and it will be easier to comment.

Hope this helps,
Dan

slim___shady
Nervous Wreck (II) Inmate

From: canada
Insane since: Aug 2002

posted posted 08-07-2004 17:40

i do have a link to the page

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 08-08-2004 12:22

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 08-08-2004 12:42

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

BillyRayPreachersSon
Nervous Wreck (II) Inmate

From: London
Insane since: Jul 2004

posted posted 08-08-2004 14:15
quote:
i do have a link to the page



Sorry - I couldn't (and still cannot) see it.

Dan

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 08-08-2004 19:06

Try using selectedIndex instead of value. THe selectedIndex will be a number from 0...7 with "Other" being 7.

-- not necessarily stoned... just beautiful.

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 08-08-2004 19:40

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

slim___shady
Nervous Wreck (II) Inmate

From: canada
Insane since: Aug 2002

posted posted 08-09-2004 03:29
quote:
InI said:

The following code works in FF, Moz, IE and Opera on my windows 2000:
. . .



Perfect! Thanks a lot InI.

hyperbole and Dan too

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 08-09-2004 07:34
quote:
BillyRayPreachersSon said:

Sorry - I couldn't (and still cannot) see it.



It's right up there in the first line of his post; the word 'this' is yellow, indicating that it is a hyperlink.

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 08-09-2004 18:30

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

BillyRayPreachersSon
Nervous Wreck (II) Inmate

From: London
Insane since: Jul 2004

posted posted 08-09-2004 18:31

Aaah - now I see it. Too late, as ever - maybe I should get new glasses

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 08-10-2004 18:49

Ini: I noticed your answer after I had posted mine. Sorry, didn't mean to step on your answer.

BTW, is there a reason to assign the string value to a variable and then test the string value instead of just testing the value of selectedIndex against the number of the item?

-- not necessarily stoned... just beautiful.

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 08-10-2004 19:16

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 08-11-2004 17:29

Makes sense. Good idea.

-- not necessarily stoned... just beautiful.

« BackwardsOnwards »

Show Forum Drop Down Menu