Results 1 to 2 of 2

Thread: Button link from text input

  1. #1
    Join Date
    Sep 2007
    Posts
    4

    Button link from text input

    I'm trying to create a form that can accept any text and then have a button that when clicked will follow what ever text is given as a link.

    for instance, I type in "http://www.itypedallallthisin.com/" into the textarea or textbox or something, then when i click a button i will be directed to that site.

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    I've never heard of this being done. If a viewer wants to visit http://www.itypedallallthisin.com/ he would type it into his browser address bar instead. Why do you want him to type it into your input box?

    I expect PHP or possibly javascript could do it. The submit button would be set up as a hyperlink with no url initially but with a request for anything typed in an input box.

    You have to consider that viewers might mis-type an address or just type text, so the PHP would have to be set up to return to the original form if the text did not conform to a url (similar to forms rejecting email addresses if not in the correct format or input boxes for required fields not being completed).

    It's beyond my capabilities, so ask on the PHP board.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Posting Permissions

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