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

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Google AJAX searchGoogle AJAX search
Previous
 
Next
New Post
3/20/2009 9:51 AM
 

 Does anyone know how to correctly added Google AJAX search into a DNN skin? Below is the code I received from the customer. My feet are to the fire to complete this skin by COB today, so any help would be greatly appreciated.

 

<form action="" id="searchbox_009877913781302332256:95fqgmktiha" onsubmit="return false;">

  <div>

    <input type="text" name="q" size="40" />

    <input type="submit" value="Search" />

  </div>

</form>

<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_009877913781302332256%3A95fqgmktiha&lang=en"></script>

 

<div id="results_009877913781302332256:95fqgmktiha" style="display:none">

  <div class="cse-closeResults">

    <a>&times; Close</a>

  </div>

  <div class="cse-resultsContainer"></div>

</div>

 

<style type="text/css">

@import url(http://www.google.com/cse/api/overlay.css);

</style>

 

<script src="http://www.google.com/uds/api?file=uds.js&v=1.0&key=ABQIAAAAfLCwwxRkMLYa6YfyYJzEwxQUEcc6XbSdRObl0b9OXsITgHciKxQeExGhvrT3WOlA4WS5B0SXeLbfPQ&hl=en" type="text/javascript"></script>

<script src="http://www.google.com/cse/api/overlay.js" type="text/javascript"></script>

<script type="text/javascript">

function OnLoad() {

  new CSEOverlay("009877913781302332256:95fqgmktiha",

                 document.getElementById("searchbox_009877913781302332256:95fqgmktiha"),

                 document.getElementById("results_009877913781302332256:95fqgmktiha"));

}

GSearch.setOnLoadCallback(OnLoad);

</script>

 

 
New Post
3/20/2009 10:45 AM
 

Here you go -- complete example of putting Google AJAX search into a DNN skin:
 
   http://googleAJAXsearch.com

 
Cheers!
-mamlin


esmamlin atxgeek.me
 
New Post
3/20/2009 12:10 PM
 

mamlin wrote

Here you go -- complete example of putting Google AJAX search into a DNN skin:
 
   http://googleAJAXsearch.com

 
Cheers!
-mamlin

 

Thanks, I actually checked out your tutorial before I posted here, I got confused since your code elements seem to differ from what I have. But any further insight is greatly appreciate it. To add more to the mix the site is running on DNN 3.x, below is the URL to the site with the non-functioning google AJAX code thrown in.

 

 
New Post
3/20/2009 2:07 PM
 

Your URL did not show up in your forum post/reply.

Regarding your original code, you cannot use a "form" tag on a DNN page.  DNN dynamicaly creates pages and inserts its own "form" tag.   If you include a "form" tag you'll end up with nested "form" tags which will not work.  You should change your "form" tags to "div" tags.  This may be all you need to change.

I noticed that your "form" tag has no defined action.  Normally for Google CSE search the action attribute would be set to "http://www.google.com/cse".  This looks like someone adapted an older postback-based CSE search with the new AJAX-based search but did not properly remove/update all of theolder elements.
 
 
Your example places the results into a dynamically-created overlay (overlay example here).  The example at http:/googleAJAXsearch.com looks a little different as it places search results inline, dynamically expanding the page and allowing the user to view both page content and search results at the same time.

-mamlin


esmamlin atxgeek.me
 
New Post
3/20/2009 2:26 PM
 

mamlin wrote

Your URL did not show up in your forum post/reply.

Regarding your original code, you cannot use a "form" tag on a DNN page.  DNN dynamicaly creates pages and inserts its own "form" tag.   If you include a "form" tag you'll end up with nested "form" tags which will not work.  You should change your "form" tags to "div" tags.  This may be all you need to change.

I noticed that your "form" tag has no defined action.  Normally for Google CSE search the action attribute would be set to "http://www.google.com/cse".  This looks like someone adapted an older postback-based CSE search with the new AJAX-based search but did not properly remove/update all of theolder elements.
 
 
Your example places the results into a dynamically-created overlay (overlay example here).  The example at http:/googleAJAXsearch.com looks a little different as it places search results inline, dynamically expanding the page and allowing the user to view both page content and search results at the same time.

-mamlin

]

 

Thanks! I will give that a try. I spoke with the site manager who wasn't too sure about the code aside from it's what Google spit out. I will give your recommendations a try.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Google AJAX searchGoogle AJAX search


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