34 users online (1 members and 33 guests)  


  Results 1 to 3 of 3

Related

  1. a help needed    Forum: HTML Forum
    Replies: 1
  2. help needed    Forum: Myspace Forum
    Replies: 4
  3. A Lot of Help Needed    Forum: Javascript Forum
    Replies: 1
  4. Help needed with DBD and DBI    Forum: CGI Perl Forum
    Replies: 8
  5. Help Needed    Forum: Barter/Trade
    Replies: 2
  1. #1
    Bainzy's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2008
    Posts
    2

    Unhappy getURL - Help needed

    Hi everyone, this is my 1st post here.

    I've just started learning Javascript and HTML.

    I trying to make a url input box where I input the final part of the url eg: tester and the page will go to www.testing.com/tester.

    It works great, but for the life of me I cant get it to load in a different frame of the page.

    Everytime I change where it should load it just loads in the same frame and the box input box disappears with it.

    Is there anyone who can tell me where im going wrong, I bet its something silly, and I feel embarrassed, I've been on it for 2 days

    the code is as follows:

    Code:
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
    <title>Untitled Document</title> 
    <script type="text/javascript"> 
    function getURL(val){ 
    base = 'http://www.tester.com/'; 
       location = base + val; 
       return false; 
    } 
    </script> 
    </head> 
    
    <body> 
    <form id="form1" name="form1" method="post" action="" onsubmit="return getURL(this.url.value)"> target="main3"> 
    
      <label> 
      <input type="text" name="url" /> 
      </label> 
      <label> 
      <input type="submit" name="Submit" value="Submit" /> 
      </label> 
    </form> 
    </body> 
    </html>
    I have changed the name of the frame and it didn't work and a million other things, none work for me.

    Any help would be greatly appreciated, thanks in advance.

  2. #2
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: getURL - Help needed

    Where do you want it to load? on a page's frame? But with the code you've provided, I can't see any existence of the frame/iframe element.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  3. #3
    Bainzy's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2008
    Posts
    2

    Re: getURL - Help needed

    Thanks for the response, but I figured it out

    I wasn't telling it in the top var where to go, silly really, thought setting the form properties to send it to the frame would work,

    But thanks again for the response

    I'm sure i'll be back for another amatuer question soon

    Cheers!



Tags for this Thread