Solved

Dreamweaver Jump Menu - onclick insted of onchange

Posted on 2006-06-12
3
898 Views
Last Modified: 2012-08-13
Hello,
      I am trying to create a jump menu in dreamweaver that will go to the desired page on click of the buy now logo. Currently it will go to the page when you change option that is selected. My current code is below. Does anyone have any idea how this can be done? Thank you!!

<form id="form1" name="form1">
     <table width="100%" border="0" cellspacing="4" cellpadding="0">
      <tr>
       <td width="40%">
        <select name="menu2" onchange="MM_jumpMenu('parent',this,0)">
             <option selected="selected">Select Size</option>
             <option value="www.yahoo.com">100 Count - $8.99</option>
             <option value="www.yahoo.com">200 Count - $14.99</option>
               <option value="www.yahoo.com">500 Count - $23.99</option>
             <option value="www.yahoo.com">1000 Count - $34.99</option>                              
        </select>
       </td>
       <td width="60%">
                <input type="image" name="Button1" value="go" src="images/btn_buynow.gif" border="0" alt="Buy Now" onclick="MM_jumpMenuGo('menu2','parent',0)" />
       </td>
   </tr>
   </table>
</form>
0
Comment
Question by:rudyflyer
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
ClickCentric earned 250 total points
ID: 16891365
<form name="form1" action="#">
<select name="menu2" size="1">
               <option selected="selected">Select Size</option>
           <option value="http://www.yahoo.com">100 Count - $8.99</option>
           <option value="http://www.yahoo.com">200 Count - $14.99</option>
           <option value="http://www.yahoo.com">500 Count - $23.99</option>
           <option value="http://www.yahoo.com">1000 Count - $34.99</option>
                 </select>
               <img src="images/btn_buynow.gif" alt="Buy Now" name="image" width="32" height="32" onclick="top.document.location = document.form1.menu2.options [document.form1.menu2.selectedIndex].value; return true;" />
</form>
0
 

Author Comment

by:rudyflyer
ID: 16893412
Thank you, that works great!
0
 
LVL 10

Expert Comment

by:ClickCentric
ID: 16895738
It was surprisingly hard to do...I forgot that image-type buttons won't work with onclick to do that in that scenario.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

When you work with shopping cart / ecommerce relates web sites, you need to pass the certain form post details to the payment gateway process page with required details for the products items you give to order. Also you may need to track the ordered…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now