Results 1 to 5 of 5

Thread: check for string in select box [Resolved]

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    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.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  2. #2

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    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.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  3. #3

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    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"?
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  4. #4
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727
    like this:

    VB Code:
    1. onClick="function1();function2();"

    But I always like to call the second function from within the first

  5. #5

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    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.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width