|
-
Aug 16th, 2004, 11:05 AM
#1
Thread Starter
Frenzied Member
check for string in select box [Resolved]
I need to check for the phrase "OICA" in a select box. Depending on which item they select in the select box, I need to change some values in some check boxes.
If you can just tell me how to check for that phrase, I can get the rest. I just don't know where to start with finding the phrase.
Thanks in advance.
Last edited by ober0330; Aug 17th, 2004 at 09:49 AM.
-
Aug 16th, 2004, 01:35 PM
#2
Thread Starter
Frenzied Member
Ok, I've got the instr part figured out... now I just have one small problem. How do I send the contents of the select box to the javascript function instead of the value?
I'm using:
Code:
document.dform.test2.options[document.dform.test2.selectedIndex].value
in my function call.
-
Aug 16th, 2004, 01:56 PM
#3
Thread Starter
Frenzied Member
Ok... so I figured out that part too... you just use "text" instead of value.
Now... a new problem. Can you call 2 functions within one "onclick"?
-
Aug 17th, 2004, 08:10 AM
#4
Fanatic Member
like this:
VB Code:
onClick="function1();function2();"
But I always like to call the second function from within the first
-
Aug 17th, 2004, 09:01 AM
#5
Thread Starter
Frenzied Member
I tried that... didn't work. Hm... maybe I have something else messed up. And I can't call the second within the first because I have to use the first one independently.
edit: Had to use double quotes instead of single quotes. Thanks.
Last edited by ober0330; Aug 17th, 2004 at 09:49 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|