Results 1 to 3 of 3

Thread: i need a code example for input box and button...

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2001
    Posts
    746

    i need a code example for input box and button...

    i need a code example for putting a button and input box on a webpage using javascript. when clicked the button should send the webbrowser to www.website.com/contentsofinputbox

  2. #2
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Code:
    <script>
    function go()
    {
      var url = "http://www.website.com/" + document.a.b.value;
      window.location = url;
    }
    </script>
    <form name="a">
    <input type="text" name="b">
    <input type="button" value="Go!" onClick="go();">
    </form>
    Alcohol & calculus don't mix.
    Never drink & derive.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2001
    Posts
    746
    thx it works great

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width