To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.publish.htmlOpen lugnet.publish.html in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Publishing / HTML / 200
199  |  201
Subject: 
Re: Help With HTML
Newsgroups: 
lugnet.publish.html
Date: 
Fri, 18 Jan 2002 08:30:33 GMT
Viewed: 
5955 times
  
Thank you so much John, the site part I needed it for is up if you want to
use it and see how it came to be.

http://www.geocities.com/aokaisui_chan

Jay



In lugnet.castle, John Herre writes:
> In lugnet.castle, Jay Rodarte writes:
> > Hi. I need some sort of code that, when you answer questions, based on your
> > answers it will take you to another page. Like a quiz. Like if i asked you
> > "What's your favorite color, and you said green, it would take you to
> > 1.html. But if you said blue it would take you to 2.html, does anyone know
> > what I mean? If so please help me.
> 
> I put a couple of short samples, both using javascript, that do what I think
> you want at
> http://home.earthlink.net/~jherre/test/select.html
> which uses a select list for the answers, and
> http://home.earthlink.net/~jherre/test/radio.html
> which uses radio buttons for the answers.
> 
> The code for these is
> <html>
> <head>
>  <title>choose a color</title>
>  <script language="JavaScript">
>   function gotoPage(selectPages) {
>    var page=selectPages.options[selectPages.selectedIndex].value;
> 
>    if (page == " ") return;
>    top.location=page;
>   }
>  </script>
> </head>
> <body>
>  <form>
>   <select onChange="gotoPage(this);">
>    <option selected value=" ">choose a color
>    <option value="red.html">red
>    <option value="blue.html">blue
>    <option value="green.html">green
>   </select>
>  </form>
> </body>
> </html>
> 
> and
> 
> <html>
> <head>
>  <title>choose a color</title>
>  <script language="JavaScript">
>   function gotoPage(radioButton) {
>    var page=radioButton.value;
> 
>    top.location=page;
>   }
>  </script>
> </head>
> <body>
>  <form>
>   choose a color
>   <input type=radio value="red.html" onClick="gotoPage(this);">red
>   <input type=radio value="blue.html" onClick="gotoPage(this);">blue
>   <input type=radio value="green.html" onClick="gotoPage(this);">green
>  </form>
> </body>
> </html>



Message is in Reply To:
  Re: Help With HTML
 
(...) I put a couple of short samples, both using javascript, that do what I think you want at (URL) uses a select list for the answers, and (URL) uses radio buttons for the answers. The code for these is <html> <head> <title>choose a color</title> (...) (25 years ago, 18-Jan-02, to lugnet.castle, lugnet.publish.html)

6 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR