Results 1 to 2 of 2
  1. #1
    ABW Ambassador Doug247's Avatar
    Join Date
    January 18th, 2005
    DE USA
    Is there a way to have a user directed to a url based on the selection of a combobx? I realize it is done with a form and I already have the Combobox dynamically filled based on a MySQL query with PHP. Here is what I have.
    print("<form method=get action=cat4.php style=display: inline; margin: 0; padding: 0;>");
    print("<select name=select style=font-size:10px; font-family:Verdana, Arial, Helvetica, sans-serif>");
    while ($row = mysql_fetch_array ($result))
    print("<option value=?GEN=$gender&BR=".urlencode(stripslashes($row[BRAND])).">".stripslashes($row[BRAND])."</option>");
    print("<input type=submit name=Submit value=Go style=font-size:10px; font-family:Verdana, Arial, Helvetica, sans-serif; font-weight:bold;></select></form>");
    mysql_close ($link);


  2. #2
    Just Lurking
    Join Date
    January 18th, 2005
    Think you need two peices of Javascript.

    <pre class="ip-ubbcode-code-pre">&lt;select name="select"

    <pre class="ip-ubbcode-code-pre">&lt;script language="JavaScript" type="text/JavaScript"&gt;
    function changePage(newLoc) {

    nextPage = newLoc.options[newLoc.selectedIndex].value

    if (nextPage != "") {
    document.location.href = nextPage

    &lt;/script&gt;</pre>Or something like that...

    [Editted misnamed element]
    Lead, Follow or Get Out of the Way!

  3. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. One Way question
    By 2busy in forum Andy Rodriguez Consulting
    Replies: 4
    Last Post: April 29th, 2007, 09:49 AM
  2. Pixel Tracking Question.. (Tech Question)
    By CoolAffiliate in forum Midnight Cafe'
    Replies: 1
    Last Post: August 14th, 2006, 12:40 AM
  3. PR question
    By UncleScooter in forum Midnight Cafe'
    Replies: 7
    Last Post: July 20th, 2004, 01:18 PM
  4. One last question
    By ronwls in forum Midnight Cafe'
    Replies: 1
    Last Post: September 28th, 2003, 10:35 PM
  5. Replies: 3
    Last Post: April 29th, 2003, 05:31 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