Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2004
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Send User To URL If Product Is For Sale

    I have a page that asks customers to vote for products they want to see for sale in the near future.
    The products are listed in a pull down. I use a script from http://www.bignosebird.com that collects the votes via a Perl script.

    here's what the pull down looks like.


    <select name="ITEM_1" size="22" id="select7">

    <option value="ITEM_1|No Vote Sent">- - Select Products For 2004 - -</option>
    <option value="ITEM_1|Hard Drives">Hard Drives</option>
    <option value="ITEM_1|iPod">iPod</option>
    <option value="ITEM_1|Computer cases">Computer cases</option>
    <option value="ITEM_1|Memory Sticks">Memory Sticks</option>

    </select>

    FYI: The value "ITEM_1" allows the script to tally the votes for that specific pull down.

    My objective is to send the user to a page if the product is already available for sale at our store. For example If the customer chooses to vote for iPod, is there a way to Have an onBlur (or onChange I guess) event that would send them to a page providing promotional info about our iPods?


    I'm guessing the best way to approach the solution is to use URL to the iPod sales page as the value.


    <option value="http://www.link_to_iPod_sales_page.html">I Pod</option>

    I've tried to use Dreamweaver's Jump menu script but it wont work because when the customer wants to vote on a product that's not at our store the script still uses the value as a link. See below for an example



    <script>

    function MM_jumpMenu(targ,selObj,restore){ //v3.0
    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    if (restore) selObj.selectedIndex=0;
    }
    </script>


    <select name="menu1" onChange="MM_jumpMenu('parent',this,0)">

    <option value="ITEM_1|No Vote Sent">- - Select Products For 2004 - -</option> > BAD LINK <
    <option value="ITEM_1|Hard Drives">Hard Drives</option> > BAD LINK <
    <option value="http://www.apple.com/iPod/">iPod</option> > GOOD LINK <
    <option value="ITEM_1|Computer cases">Computer cases</option> > BAD LINK <
    <option value="ITEM_1|Memory Sticks">Memory Sticks</option> > BAD LINK <

    </select>


    Could you provide a script solution that does not try to use value ="ITEM_1|any product not available for sale" as a link but will if the value is value="http://link to any product available for sale ?

    Know of any examples on the net that come close to this request? I've been looking high and low and have found nothing close.


    Thanks in advance for any input on this one
    Don't Stop Learning!

    Never Give Up!

  • #2
    New Coder
    Join Date
    Jan 2004
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Clarification:

    Hmmm, lets see.

    The pull down is within a form tag that sends the results to the vote script.

    Also within the <form> tag there would be a script that would send the user to a page if that product item is already available for sale.

    There will be no dynamically created content in this solution.
    The products available for sale will have their own splashy sales html pages.

    When you refer to "object" I'm a bit confused. I guess my answer would be the object is the html document holding the sales info for the products.

    I think the best even handler would be onBlur (correct me if I'm wrong) because we need the customer to get shot to the product page when they select the product in the pull down not when they hit the send button at the bottom of the form.
    Don't Stop Learning!

    Never Give Up!

  • #3
    New Coder
    Join Date
    Jan 2004
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Clarification: No Dynamic Pages

    Hmmm, lets see.

    The pull down is within a form tag that sends the results to the vote script.

    Also within the <form> tag there would be a script that would send the user to a page if that product item is already available for sale.

    There will be no dynamically created content in this solution.
    The products available for sale will have their own splashy sales html pages.

    When you refer to "object" I'm a bit confused. I guess my answer would be the object is the html document holding the sales info for the products.

    I think the best even handler would be onBlur (correct me if I'm wrong) because we need the customer to get shot to the product page when they select the product in the pull down not when they hit the send button at the bottom of the form.
    Don't Stop Learning!

    Never Give Up!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •