Combo Box Drop Down

Community Forums Forums Design Tips and Tricks Combo Box Drop Down

This topic is: not resolved

This topic contains 9 replies, has 2 voices, and was last updated by  dev 11 months, 1 week ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #41527

    erinakong
    Participant
    Post count: 6

    I am trying to insert a combo box drop down/item list into my page.

    I couldn’t find a plugin to do this….does anyone know of one?

    I tried to build it myself, but I could not work out how to direct to another page once that ‘value has been selected.

    Take a look here.

    http://carriedebuys.com/test-for-drop-box/

    Can anyone help?

    Thanks in advance

    http://carriedebuys.com/test-for-drop-box/
    #41655

    dev
    Participant
    Post count: 408

    I don’t know where you got the HTML code for what you did, but I’d do it this way:

     

    <select id=”mySelect” onchange=”if(this.options[this.selectedIndex].value != ”){window.top.location.href=this.options[this.selectedIndex].value}”>
    <option value=”">Select Below</option>
    <option value=”http://www.google.com”>Google</option>
    <option value=”http://www.yahoo.com”>Yahoo</option>
    <option value=”http://www.hotmail.com”>Hot Mail</option>
    </select>

    • This reply was modified 11 months, 1 week ago by  dev.
    • This reply was modified 11 months, 1 week ago by  dev.
    • This reply was modified 11 months, 1 week ago by  dev.
    • This reply was modified 11 months, 1 week ago by  dev.
    • This reply was modified 11 months, 1 week ago by  dev.
    • This reply was modified 11 months, 1 week ago by  dev.
    #41664

    erinakong
    Participant
    Post count: 6

    Thanks so much for your help.  I am going to try it now.

     

     

    • This reply was modified 11 months, 1 week ago by  erinakong.
    • This reply was modified 11 months, 1 week ago by  erinakong.
    #41667

    erinakong
    Participant
    Post count: 6

    I just coped your code.  It doesn’t seem to work….?

    #41670

    dev
    Participant
    Post count: 408

    Hmmm. It works for me on a test page:

    http://newmediawebsitedesign.com/wp2/test-2/

    Are you putting the HTML in one of the Agent Press’s widgets? Try it on a plain old page and see if it works.

    I see your code in the page…

    <div class="entry-content">
    			<select id=”mySelect” onchange=”if(this.options[this.selectedIndex].value != ”){window.top.location.href=this.options[this.selectedIndex].value}”>
    <option value=”">Select Below</option>
    <option value=”http://www.google.com”>Google</option>
    <option value=”http://www.yahoo.com”>Yahoo</option>
    <option value=”http://www.hotmail.com”>Hot Mail</option>
    </select>
    		</div><!-- end .entry-content -->
    

    Maybe the class “entry-content” is screwing things up? What does it style?

    • This reply was modified 11 months, 1 week ago by  dev.
    • This reply was modified 11 months, 1 week ago by  dev.
    • This reply was modified 11 months, 1 week ago by  dev.
    • This reply was modified 11 months, 1 week ago by  dev.
    #41679

    erinakong
    Participant
    Post count: 6

    It’s not in a widget.  i just cut and pasted it in to the html box.  I inherited this site so I am not sure about….much….sorry.  How can I find out?

    #41688

    dev
    Participant
    Post count: 408

    What is an ‘html box?”

    Take a look at the class ” dsidx-widget-search” and use that to style your drop down. That might work. It is in client.css

    Without being able to login and seeing what you are doing, there isn’t much more I can suggest.

     

    http://www.newmediawebsitedesign.com

    #41690

    erinakong
    Participant
    Post count: 6

    I am more than willing to give you the log-in for you to check it out.  I REALLY appreciate your time in helping me.

     

    #41691

    dev
    Participant
    Post count: 408

    One last guess… You copied my code? Perhaps your editor created “smart quotes”:

     
    <div id=”content-sidebar-wrap”>

    <div id=”content” class=”hfeed”>
    <div class=”post-308 page type-page status-publish hentry”>

    <h1 class=”entry-title”>Test for Drop box</h1>

    <div class=”entry-content”>
    <select id=”mySelect” onchange=”if(this.options[this.selectedIndex].value != ”){window.top.location.href=this.options[this.selectedIndex].value}”>

    Uncaught SyntaxError: Unexpected token ILLEGAL

    <
    Check the quote marks in YOUR code to make sure they are OK…. “mySelect  and !=” etc.

    When I ran your code under Chrome Resources I get “Unexpected token ILLEGL” It’s a syntax error… so there is some junk in the code… my bet is is the quotes.

    #41693

    dev
    Participant
    Post count: 408
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.