spacer
Yehuda Shiran November 30, 2000
Printing the Selected Item
Tips: November 2000

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

One of the advantages of Netscape 6 over Internet Explorer is the ability to print the selected item of a SELECT element. The following drop down menu includes two entries, Al Gore and George W. Bush. Here is the HTML code for this menu:

<SELECT name="presidents">
<OPTION>Al Gore
<OPTION SELECTED>George W. Bush
</SELECT>

The button on the right hand side triggers a call to:

alert(document.election.presidents.value)

Try changing the selection in the drop-down menu. Click the button. In Internet Explorer, the alert box will show up empty. In Netscape 6, the alert box will echo your selection.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business