SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member norfeem's Avatar
    Join Date
    Nov 2003
    Location
    NJ
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question join or concat a new path

    I would like to go to a url based on what the user selects from three seperate pull down menus.

    Example user selects a product. Then selects a month and Selects a year.

    month and year would join together Then create a path

    <a href="product/month_year/DEFAULT.HTM">

    I this possible with javascript.
    Last edited by norfeem; Dec 2, 2003 at 15:21. Reason: can't read the yellow on top of blue

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes. Here's a generic example
    Code:
    var f = document.forms['formName'];
    var product = f.product.options[f.product.selectedIndex].value;
    var year = f.year.options[f.year.selectedIndex].value;
    var month = f.month.options[f.month.selectedIndex].value;
     
    top.location.href = product + "/" + month + "_" + year + "/DEFAULT.HTM";
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    SitePoint Member norfeem's Avatar
    Join Date
    Nov 2003
    Location
    NJ
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you its working flawlessly


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
  •