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

    Join Date
    May 2000
    Rep Power
    Hi guys I have a problem(again)

    I have 3 .html files:

    1. creates 2 vertical frames
    2. creates 2 horizontal frames in the right frame of 1.
    3. creates 2 vertical frames in the bottom frame of 2.

    Now In the document of frame 2a I want to create a textbox and button where the user can type in a url and by pressing on the button the requested url will load in the frame. I tried this:

    <SCRIPT LANGUAGE="JavaScript">
    function testResults (form) {
    var TestVar = form.textfield.value;

    and in the body:

    <form name="a" method="get" action="" Target="main">
    <input type="text" Value="http://www.yahoo.com" name="textfield" size=50>
    <input type="submit" name="Submit" value="go" onClick="testResults(this.form)" >

    But this doesn't work. I tried everything I could think of, and looked everywhere, so If any of you could help me, I'd be much obliged. Thanks

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

    Join Date
    Oct 1999
    Rep Power
    Well first of all your form isnt going to work the way you have it and id modify the script a bit too.

    Try this instead:

    <script language="JavaScript">
    function go(){
    URL = document.myForm.theURL.value;

    Just change "framename" to the name of the frame you are trying to load this in.

    <form name="myForm">
    <input type="text" name="theURL" size="50">
    <input type="button" value="Go" onClick="go()">

    That should work.


Similar Threads

  1. Javascript loading xml intro dropdowns
    By Kim Turley in forum JavaScript Development
    Replies: 1
    Last Post: May 11th, 2005, 11:05 PM
  2. Loading a file over HTTP using Javascript?
    By neobuddah in forum JavaScript Development
    Replies: 10
    Last Post: October 10th, 2003, 07:21 AM
  3. Replies: 4
    Last Post: January 28th, 2003, 07:53 PM
  4. inserting javascript into html document
    By davidgraham16 in forum JavaScript Development
    Replies: 7
    Last Post: January 24th, 2003, 04:57 AM
  5. Replies: 0
    Last Post: February 28th, 2002, 03:12 PM

IMN logo majestic logo threadwatch logo seochat tools logo