Solved

Dreamweaver Jump Menu - onclick insted of onchange

Posted on 2006-06-12
3
954 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
RSS Feeds--IE 13 189
character entities and entity references in XML 17 139
Getting attribute Values using xslt 4 59
Create associate webpages / websites 3 98
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

680 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