Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Oct 2011
    Posts
    113
    Thanks
    9
    Thanked 1 Time in 1 Post

    ------| QUICK HELP: Textbox onclick redirect to another page |--------

    So Basically I want to do this
    PHP Code:
    <input type="text" onclick="Redirect to another page" class="searchfeild" /> 
    How can I do this?

    Thanks.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,622
    Thanks
    80
    Thanked 4,635 Times in 4,597 Posts
    Code:
    <anytag onclick="location.href='http://anysite.com/anyfolder/anyfile.xxx';" />
    If the page is on the same web site as the tag, then simplify it to
    Code:
    <anytag onclick="location.href='/anyfolder/anyfile.xxx';" />
    If the page is on the same web site and in the same folder as the tag, then simplify it to
    Code:
    <anytag onclick="location.href='anyfile.xxx';" />
    And variations on the above.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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