Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: multiple dropdowns w/ image button

  1. #11
    Join Date
    Sep 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank You! Everything works now, except for when I ad an image button to it. Is there any way around this problem? and is there function option that would hide the text blocks that display the text that displays in the text area?

  2. #12
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The image button, if it is a true input type="image" should behave the same as long as it is named the same as the input type="button" that it replaced. If it is a linked image, retain the input type="button" but change it's type attribute to "hidden" (you can also remove its style). Then make your linked image like so:

    HTML Code:
    <a href="#" onclick="jumptolink(document.form2.thebut);return false;"><img src="button.gif" border="0"></a>
    is there function option that would hide the text blocks that display the text that displays in the text area?
    There are no textarea tags in the markup I posted. If you mean the text input tags, I think so but, am not sure what you mean by 'text blocks'. If you mean the border, that is what the style border:0; does. If you simply don't want them seen at all, change their type from "text" to "hidden".
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #13
    Join Date
    Sep 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Awesome! I have another question Is it possible to create values for each option and have the text used in the values to deturmine the outcome for each drop down so incase there's a character in the item label such as ",&#233;&#252;&#229; that may not be understood by server?
    Last edited by thewebmacster; 09-24-2006 at 01:54 AM.

  4. #14
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    OK, first of all, if you are using any type of image for your 'go' button, you can get rid of this:

    Code:
    butt.style.backgroundColor=sels[c-1].options[sels[c-1].selectedIndex].text.toLowerCase();
    butt.style.color=sels[c-1].options[sels[c-1].selectedIndex].text.toLowerCase()=='yellow'? 'black' : 'white';
    If you want to use the select option's values instead of their text, you need to set a value for each option and change this:

    Code:
    butt.value=sels[(c>1? 0 : 1)].options[sels[(c>1? 0 : 1)].selectedIndex].text+' '+sels[c-1].options[sels[c-1].selectedIndex].text;
    to:

    Code:
    butt.value=sels[(c>1? 0 : 1)].options[sels[(c>1? 0 : 1)].selectedIndex].value+' '+sels[c-1].options[sels[c-1].selectedIndex].value;
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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