Wanted: Dropdown menu to change action URL

Discussion in 'Programming' started by Peter Brown, Sep 15, 2008.

  1. #1
    I'm looking for someone to code me a simple php script that changes the action URL of a form once a user selects the feature (e.g. blog or forum) from the drop down menu.

    http://www.ceneb.com

    You can see how I'm wanting it to work underneath the navigation bar.

    PM me a quote or add me on MSN .
     
    Peter Brown, Sep 15, 2008 IP
  2. jBud

    jBud Peon

    Messages:
    387
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    how about something like this?
    <script type="text/javascript" name="JavaScript"><!--
    function FormAction() {
       document.form.action = document.form.url.value;
    return true;
    }
    //--></script>
    
    
    <form name="form" action= "val" method="post">
    <select name="url">
      <option value="whatever.php?value=some_val">The Site</option>
      <option value="whatever.php?value=some_val">The Domain Catalog</option>
    </select>
    <input type="button" value="GO" onClick="FormAction();form.submit();" />
    </form>
    HTML:
     
    jBud, Sep 15, 2008 IP
    Peter Brown likes this.
  3. happpy

    happpy Well-Known Member

    Messages:
    926
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    120
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    btw
    this is what your site looks like in firefox on linux...
    [​IMG]
     
    happpy, Sep 15, 2008 IP
  4. Peter Brown

    Peter Brown Well-Known Member

    Messages:
    1,638
    Likes Received:
    117
    Best Answers:
    0
    Trophy Points:
    180
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    Thanks jbud, that seemed to work a treat, much appreciated!

    Thanks for the screenshot happpy, I coded it months ago, it was one of the first things I'd coded and as you can see ^ it wasn't too great. In the past week though, I've recoded it and its perfect.
     
    Peter Brown, Sep 17, 2008 IP
  5. happpy

    happpy Well-Known Member

    Messages:
    926
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    120
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    sorry to bump
    but my screenshots shows, how it still looks like in firefox 2.0.0.2
     
    happpy, Sep 17, 2008 IP
  6. Peter Brown

    Peter Brown Well-Known Member

    Messages:
    1,638
    Likes Received:
    117
    Best Answers:
    0
    Trophy Points:
    180
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    I haven't yet uploaded the updated site but it should be updated in the next few days, I'm wanting to put it all into WordPress before I next update.
     
    Peter Brown, Sep 17, 2008 IP