#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    8
    Rep Power
    0
    I have a list box on my html form. Depending on which value is selected in the list box, I want to display a different page (the pages displayed will be .idc pages).

    Does anyone know how this is possible as I have been trying to find out and can't! I am quite new to this so it is probably simple!

    Thanks
    Jo
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    SPAIN
    Posts
    47
    Rep Power
    15
    put this in the <script> section

    function goPage()
    {
    location=document.lbox.Pages.options[document.lbox.Pages.selectedIndex].value
    }

    and this inside the <body>

    <form name="lbox">
    <select name="Pages" size="1" onChange="GoPage()">
    <option value="page1.htm">P1</option>
    <option value="page2.htm">P2</option>
    <option value="page3.htm">P3</option>
    </select>

    To change the frame where the window will be opened, use self.location, parent.location, mainFrame.location, ... or add a new parameter to the goPage function.

Similar Threads

  1. function to populate list box - SQL error
    By Toby72 in forum PHP Development
    Replies: 1
    Last Post: December 7th, 2003, 07:14 PM
  2. Trouble loading data into a list box
    By dcj1978 in forum Visual Basic Programming
    Replies: 5
    Last Post: September 15th, 2003, 12:09 AM
  3. Replies: 1
    Last Post: February 15th, 2003, 12:39 PM
  4. Dynamically assigning list box values
    By bella in forum HTML Programming
    Replies: 1
    Last Post: February 3rd, 2003, 11:14 PM
  5. lookup list in select box, not only by first letter
    By avivit in forum HTML Programming
    Replies: 2
    Last Post: February 2nd, 2003, 01:10 AM

IMN logo majestic logo threadwatch logo seochat tools logo