Solved

opening pages using a dropdown list box

Posted on 1999-01-28
3
146 Views
Last Modified: 2011-10-03
how do i open a page using a listbox?
0
Comment
Question by:_nin_
  • 2
3 Comments
 
LVL 4

Expert Comment

by:martinag
ID: 1845794
<FORM>
<SELECT onChange="location.href=this.options[this.selectedIndex].value">
<OPTION VALUE="page1.htm">Page 1
<OPTION VALUE="http://www.ibm.com">IBM
etc
</SELECT>
</FORM>

Martin
0
 
LVL 4

Accepted Solution

by:
ruperts earned 30 total points
ID: 1845795
This will open a page in the frame called mainwin

To see an example go to www.rest.demon.co.uk/fruit

If you want to learn about it go to...
http://www.builder.com/Programming/Kahn/120397/index.html

Rupert

<head>
<SCRIPT language="JavaScript">
function spawnWin(options) {
 var url = options[
  options.selectedIndex
  ].value+'.html';
 var winArgs = "top=10,left=10,";
 winArgs+= "width=300,height=100";
 var howdy = open(url,"mainwin");
 }
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#003366">

<table width="100%">
  <tr BGCOLOR="#003366" width="100%">
    <td width="100%"><p align="center"><strong><font COLOR="#ffcc00">Menu</font></strong></td>
  </tr>
  <tr BGCOLOR="#00FFFF">
    <td bgcolor="#FFcc00"><br>
    <strong><font color="#003366">Go to...</font> </strong>
      <form NAME="MachineForm">
      <p><SELECT name="salut8n" onChange="spawnWin(this.options)"
 onBlur="return options[0].selected = true">
 <option VALUE="main">Machine Guides </option>
        <option VALUE="andycapp">Andy Capp</option>
        <option VALUE="apollo9">Apollo 9</option>
       </select> </p>
    </form>
0
 
LVL 4

Expert Comment

by:ruperts
ID: 1845796
You can remove all the table tags..

i.e <table> <td> <tr> etc...

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

707 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

15 Experts available now in Live!

Get 1:1 Help Now