Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Google Adsense problemsGoogle Adsense problems
Previous
 
Next
New Post
2/11/2007 10:34 AM
 

I've been trying to load an Google search bar into a site and can't get it to complete the search.  The code is taken directly from my acct on the Google site so it should? work correctly.  I have it set to open a new window to display the results although I have tried setting to open within the site as well.  Neither works.  The search box displays correctly, I can enter a search term but when I click search the page refreshes but does not display results of the search. 

The code is below for those more knowledgeable than I.  My acct code has been replaced with ** deliberately so that's not the problem.

I also tried replacing target="google_window" with target="new" but that didn't work either.

Any ideas?

<!-- Search Google -->
<center>
<form method="get" action="http://www.google.com/custom" target="google_window">
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></img></a>
<br/>
<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input>
</td></tr>
<tr><td valign="top" align="left">
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Search" id="sbb"></input>
<input type="hidden" name="client" value="pub-**************"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
</center>
<!-- Search Google -->

 

 
New Post
2/11/2007 12:01 PM
 

 

You can't add another < Form > tag to the output of your page.

Remove the Form tags in that html, then change the submit button to add an onclick like this:

<input type="submit"
     onclick="this.form.action='http://www.google.com/custom';this.form.target='google_window';this.form.submit();" 
name="sa" value="Search" id="sbb"></input>


DotNetNuke Modules from Snapsis.com
 
New Post
2/11/2007 12:18 PM
 

Thanks for the help John:

This is what I ended up with which still doesn't seem to work. I get a page refresh but no results.  I probably have a mistake in here somewhere.

<!-- Search Google -->
<center>
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></img></a>
<br/>
<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input>
</td></tr>
<tr><td valign="top" align="left">
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Search" id="sbb"></input>
<input type="hidden" name="client" value="pub-*************"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input>
<input type="submit"
onclick="this.form.action='http://www.google.com/custom';this.form.target='google_window';this.form.submit();" 
name="sa" value="Search" id="sbb"></input>
</td></tr></table>
</center>
<!-- Search Google -->

 
New Post
2/11/2007 2:20 PM
 

 

Sorry, I missed the GET part on the method, it is still posting.  Change the onclcik statement to this:

onclick="this.form.action='http://www.google.com/custom';this.form.target='google_window';this.form.method='GET';this.form.submit();" 

 


DotNetNuke Modules from Snapsis.com
 
New Post
2/11/2007 4:20 PM
 

Great job John!  Thanks a lot!  I had to delete the line

<input type="submit" name="sa" value="Search" id="sbb"></input>

from earlier in the code because it was giving me two Search buttons.  Once I did that it worked like a charm.  You known your code that's for sure. 

Have a great what's left of the weekend!

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Google Adsense problemsGoogle Adsense problems


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out