Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

opening pages using a dropdown list box

Posted on 1999-01-28
3
Medium Priority
?
198 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 120 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

886 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