Solved

Dreamweaver Jump Menu - onclick insted of onchange

Posted on 2006-06-12
3
964 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Does a Google search find images with the word being searched? 11 108
Adjust the position 3 75
The Best Website Creation Tools 14 122
Unexpected End of File 11 88
There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

710 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