[RESOLVED] Google search box won't search
I'm using IE8 to test
Hi, I'm trying to add a google search box (in a table) to my web page, but for some reason it the input button links to the page I am currently on. The strange part is that I put the same exact code in another cell right next to the other google search box and that one works wonderfully while the first one still links to the current page. It is the same with any search engine (yahoo, bing, ask), the first search box links to the current page and the rest work great. Here is the code I use:
Code:
<form method="get"action="http://www.google.com/search">
<input style="width:140px"type="text"name="q"size="31"maxlength="255"value=""/><br/>
<input type="submit"value="Google Search"/>
Thanks.
**EDIT**
I think I may have found something. I made an html page with a table and two search boxes, and it worked fine. When I put it into an .aspx file the first search box didn't work. So I'm wondering if the .aspx file is messing it up. Still don't know what to do about it though...
Re: Google search box won't search
Well...to start off, you're missing some serious spaces within the one tag.
Re: Google search box won't search
Quote:
Originally Posted by
PeejAvery
Well...to start off, you're missing some serious spaces within the one tag.
Don't worry the spaces are there I just didn't notice when I copied and pasted into the thread. Anyway I figured out the problem is that the code was in the <form> tag for the whole page. So I moved the </form> tag to an appropriate spot and it works wonderfully.
Thanks.