home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / dhtmlunl / dhtml.exe / CD Content / Chap08 / dun8_2.txt < prev    next >
Encoding:
Text File  |  1997-12-18  |  861 b   |  34 lines

  1. <html>
  2.  
  3. <head>
  4.  
  5. <title>Where Do You Wanna Go?</title>
  6.  
  7. </head>
  8.  
  9. <script language="JavaScript">
  10.  
  11. <!---// hide the script from older browsers
  12.  
  13.  
  14.  
  15. //this is the 'jump' function, that we'll use to accept input from
  16.  
  17. //the form, and redirect the user to what the URL they entered
  18.  
  19. //this function is called with one argument (frm) which is a reference
  20.  
  21. //to the form that the user filled in.
  22.  
  23.  
  24.  
  25. function jump(frm){
  26.  
  27.    //the frm object has an element called URL, we'll use that value
  28.  
  29.    //for the new location for this window.
  30.  
  31.    window.location = frm.URL.value;
  32.  
  33.    }
  34.  
  35. }
  36.  
  37.  
  38.  
  39. // end hiding --->
  40.  
  41. </script>
  42.  
  43. <body bgcolor="#FFFFFF">
  44.  
  45. <center>
  46.  
  47. <form>
  48.  
  49. <h2>Where To?</h2>
  50.  
  51. <br>
  52.  
  53. <input type="text" name="URL" value="" size=35>
  54.  
  55. <br>
  56.  
  57. <input type="button" onClick="jump(this.form)" value="Jump!">
  58.  
  59. </form>
  60.  
  61. </center>
  62.  
  63. </body>
  64.  
  65. </html>
  66.  
  67.