SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dynamic PHP Drop Menu to Perform w/ js rather than submit button

    Hi all, I currently have a PHP menu that drops the appropriate brand names to select by brand. The selection is made by pressing the submit button. The goal is to select a brand utilizing javascript to pass variables on to the brand.php page rather than 1)click the brand then 2) click the 'submit' button. I have very little js experience, so I'm looking for suggestions on examples, links, tutorials, or articles that would help with selection w/o submission button.

    Code I'm currently working with:



    PHP Code:

         
    <form action=\"brand_results.php\" method=\"get\" >
         
             <p>
                <select id=\"brand_id\" name=\"brand_id\">
                <option value=\"0\">Select a Brand</option> 



    PHP Code:
            </select>
                <
    input name=\"go\"
                 type=\"submit\"
                 value=\"Sort By Brand\" />
                 
        </p> 
    Thanks in advance for any recommendations.

    Maxwell

  2. #2
    SitePoint Enthusiast aksival's Avatar
    Join Date
    Nov 2009
    Location
    Central Florida, USA
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you talking about the registration name/email on the right of that page?

    If so, you have a generic selector on line 78 of css.css that has a width attribute set to 250px. Just override that with a more specific selector and set the width to something smaller. Tip: you might want to add an ID to the containing form to make it easier to identify.

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    aksival, I believe you meant to reply to another thread.

    Maxwell

  4. #4
    SitePoint Enthusiast aksival's Avatar
    Join Date
    Nov 2009
    Location
    Central Florida, USA
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Urgh, yes, I had two tabs open and your code sample looked like the one on the other thread. Apologies


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
  •