Results 1 to 2 of 2

Thread: moving and stringing

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2005
    Posts
    75

    moving and stringing

    Hi

    i have:

    <input type="text" name="T1">
    <input type="button">

    my question is:
    i want that when the user is enter a string in the textbox and click the button.
    a url open with the string www.[T1].com for example.
    how can i do that???

    thanks a lot

  2. #2
    Addicted Member
    Join Date
    Jul 2004
    Location
    Mumbai
    Posts
    236

    Re: moving and stringing

    hi

    in the onclick event of the button call a function which will open the page..

    Code:
    <body>
    <script language="javascript">
    function ca(){
    // opens in the same window
    //	location.href = "http://www." + demo.t1.value + ".com"; 
    // opens in blank window
    	window.open( "http://www." + demo.t1.value + ".com", "Sample");
    }
    </script>
    <form name = "demo">
    <input type = "textbox" name = "t1">
    <input type = "button" name = "b1" value = "click" onclick="ca()">
    </body>
    --Kishore...

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