posted on Thursday, September 16, 2004 11:32 PM
by
demiliani
How to launch a Google search from your Blog
Some days ago I had lots of problems with an HTML form inserted on my blog, simply to have a quick way to do some searches with Google on DotNetJunkies.
The problems was caused by the GET method of the form, that on .Text caused the block of all the buttons (feedback and contact)... was impossible to send me feedback and contacts via email.
Today I've found a solution... my idea to perform this task is using an <IFRAME> tag for inserting the form on the blog. The <IFRAME> tag is used to insert an inline frame into the body of an HTML document and seems working really good (as you can see).
This is exactly what I've done:
I've written an HTML file (GoogleSearch.htm) where I've placed the Google Form code:
| <html> <head> <title>Google Search</title> </head> <body> <FORM method=GET action="http://www.google.com/search" target="new"> <A HREF="http://www.google.com/" target="_blank"> <IMG SRC="Logo_40wht.gif" border="0" ALT="Google" width="128" height="53"></A> <INPUT TYPE=text name=q size=15 maxlength=255 value=""><br> <INPUT type=submit name=btnG VALUE="Search"> <input type=hidden name=domains value="dotnetjunkies.com"> <br> <input type=radio name=sitesearch value="dotnetjunkies.com" checked> <font size="3">On DotNetJunkies</font> </FORM> </body> </html> |
and I've placed this file on my website, to have an url to launch it.
After that, I've inserted on my .Text Blog (under Admin section --> Options --> Configure --> Static News/Announcement fields) the code below:
This code place my GoogleSearch form on an IFRAME that has the size equals to the 80% of the left column of the blog (where it's inserted).
Results? The GET method of the form is called by another page and don't interact with .Text. 