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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Html google search, open in new tab

    Hi,

    I'm new to coding and am currently trying to put together a simple intranet at our company. I've been able to get the following code for a google search to work but have been unable to get the search box input results to open in a new tab.

    <form method="get" action="http://www.google.com/search">
    <table border="0" cellpadding="0">
    <tr><td>
    <input type="text" name="q" size="80" maxlength="255" value="" />
    <input type="submit" value="Google Search" / target="_blank"></td></tr>
    <tr><td align="center" style="font-size:75%">
    </td></tr></table>
    </div>

    Any suggestions? I know that "_blank" works for when you want to open an href in a new window or tab but I'm at a loss for doing it with variables generated by a search.

    Thanks,

    Dton

  • #2
    Regular Coder
    Join Date
    Dec 2010
    Posts
    414
    Thanks
    22
    Thanked 55 Times in 55 Posts
    You should be able to do the same thing inside of the form like this


    <form method="get" action="http://www.google.com/search" target="_blank">

    Let me nkow

  • Users who have thanked aaronhockey_09 for this post:

    Dton (06-28-2012)

  • #3
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Sorry about the delayed response, project got side tracked by an exchange server catastrophe. That code worked though, thanks a bunch!!


  •  

    Posting Permissions

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