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:

<iframe width="80%" height="170" src="http://www.demiliani.com/GoogleSearch.htm" frameborder="no" scrolling="no">
Sorry, you need inline frames to fully see this page.</iframe>

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.

Print | posted on Thursday, September 16, 2004 5:32 PM

Comments on this post

# re: Bigino .Text: Aggiungere la ricerca sul blog utilizzando Google...

Requesting Gravatar...
Left by Lorenzo Barbieri @ UGIblogs! on Sep 16, 2004 7:33 AM

# Bigino .Text: aggiornamento sulla ricerca con Google nel blog...

Requesting Gravatar...
Left by Lorenzo Barbieri @ UGIblogs! on Sep 16, 2004 6:27 PM

# re: How to launch a Google search from your Blog

Requesting Gravatar...
Did you know that you can have two forms on a page too?
Give each form a unique name then either have a submit button within each form or use javascript to do the submitting. I dunno, something like
if(form1postrequired){
document.form1.submit();
}
else{
document.form2.submit();
}
just thought I'd throw that in
Left by paser by on Sep 17, 2004 3:09 AM

# re: How to launch a Google search from your Blog

Requesting Gravatar...
Mmm... I don't have well understand what you want to say with 2 forms, but I don't know if your solution could be done here. To do what you want to say, I must rewrite the .Text blog main page html, and it's impossible.
Left by Stefano Demiliani on Sep 17, 2004 3:21 AM

# Google Search con due opzioni

Requesting Gravatar...
Left by MatteoC WebLog on Sep 23, 2004 11:31 PM

# Google Search con due opzioni

Requesting Gravatar...
Left by MatteoC WebLog on Dec 16, 2004 9:54 PM

Your comment:

 (will show your gravatar)
 
Please add 2 and 6 and type the answer here: