BothWorldsJo
asked on
Google Custom Search Results Returned in IFrame Not Working in SSL webpage?
Hi!
I have a website where I recently added Google's custom search engine. The results are returned in an IFrame. If it returns to a secure page, it errors in IE and Firefox. If it's an unsecure page, no problem. To test, enter classes in the second Google searchbox -
https://shopping.classregistrar.com/CVSFSearchadv.aspx
http://shopping.classregistrar.com/CVSFSearchadv.aspx
Any ideas how to get it to resolve cleanly? Can I rewrite their javascript, maybe hold it locally?
This is their insert on the return results page -
<script type="text/javascript">
var googleSearchIframeName = "cse-search-results";
var googleSearchFormName = "cse-search-box";
var googleSearchFrameWidth = 600;
var googleSearchDomain = "www.google.com";
var googleSearchPath = "/cse";</script>
<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>
Thanks,
Jo
I have a website where I recently added Google's custom search engine. The results are returned in an IFrame. If it returns to a secure page, it errors in IE and Firefox. If it's an unsecure page, no problem. To test, enter classes in the second Google searchbox -
https://shopping.classregistrar.com/CVSFSearchadv.aspx
http://shopping.classregistrar.com/CVSFSearchadv.aspx
Any ideas how to get it to resolve cleanly? Can I rewrite their javascript, maybe hold it locally?
This is their insert on the return results page -
<script type="text/javascript">
var googleSearchIframeName = "cse-search-results";
var googleSearchFormName = "cse-search-box";
var googleSearchFrameWidth = 600;
var googleSearchDomain = "www.google.com";
var googleSearchPath = "/cse";</script>
<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>
Thanks,
Jo
ASKER
I have been dealing with this issue since CSE went live. The easiest
solution i've found is how www.printa.com implemented the code. In
fact, im going to do the same on www.bottleyourbrand.com.
I emailed customer support and just received a reply back from
Google. Here's what they stated.
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --
Hi Scott-
Currently there is no way to get download the javascript using HTTPS
from google's website.
i.e, if you're using the iframe
http://www.google.com/afso nline/show _afs_searc h.js will work but
https://www.google.com/afs online/sho w_afs_sear ch.js wont.
One workaround you could try that involves a bit of coding is to proxy
the search query on your website.
That is, you could write a .php or .jsp page which collects the search
query from the user and submits a URL like the following to get the
raw XML coming back: In the example below, its a query for q=brand
http://www.google.com/cse? cx=0103755 5231976944 0266:adtz_ wjhhmw&ie= UTF...
Once you have the raw xml, you could write an xslt to transform it to
anything/anyformat you chose.
http://www.google.com/coop /docs/cse/ resultsxml .html
The other way is to proxy the javascript call from the browser to your
webserver as https and you retrieve the show_afs_search.js script on
your own. The problem with that is we may change the javascript on
the google.com servers at anytime and if our .js page as local URL
references, it will break completely.
The easiest way I'm aware of is doing the XML transforms.
There is a feature request to support https and we've submitted it to
engineering as issue #829046.
Best regards,
Google Enterprise Support
I have been dealing with this issue since CSE went live. The easiest
solution i've found is how www.printa.com implemented the code. In
fact, im going to do the same on www.bottleyourbrand.com.
I emailed customer support and just received a reply back from
Google. Here's what they stated.
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --
Hi Scott-
Currently there is no way to get download the javascript using HTTPS
from google's website.
i.e, if you're using the iframe
http://www.google.com/afsonline/show_afs_search.js will work but
https://www.google.com/afsonline/show_afs_search.js wont.
One workaround you could try that involves a bit of coding is to proxy
the search query on your website.
That is, you could write a .php or .jsp page which collects the search
query from the user and submits a URL like the following to get the
raw XML coming back: In the example below, its a query for q=brand
http://www.google.com/cse?cx=010375552319769440266:adtz_wjhhmw&ie=UTF...
Once you have the raw xml, you could write an xslt to transform it to
anything/anyformat you chose.
http://www.google.com/coop/docs/cse/resultsxml.html
The other way is to proxy the javascript call from the browser to your
webserver as https and you retrieve the show_afs_search.js script on
your own. The problem with that is we may change the javascript on
the google.com servers at anytime and if our .js page as local URL
references, it will break completely.
The easiest way I'm aware of is doing the XML transforms.
There is a feature request to support https and we've submitted it to
engineering as issue #829046.
Best regards,
Google Enterprise Support
You could read full support article here
http://groups.google.com/group/google-custom-search-cse-and-your-site/browse_thread/thread/b06fc51e3ac168bc
Good Luck
Michael
solution i've found is how www.printa.com implemented the code. In
fact, im going to do the same on www.bottleyourbrand.com.
I emailed customer support and just received a reply back from
Google. Here's what they stated.
--------------------------
Hi Scott-
Currently there is no way to get download the javascript using HTTPS
from google's website.
i.e, if you're using the iframe
http://www.google.com/afso
https://www.google.com/afs
One workaround you could try that involves a bit of coding is to proxy
the search query on your website.
That is, you could write a .php or .jsp page which collects the search
query from the user and submits a URL like the following to get the
raw XML coming back: In the example below, its a query for q=brand
http://www.google.com/cse?
Once you have the raw xml, you could write an xslt to transform it to
anything/anyformat you chose.
http://www.google.com/coop
The other way is to proxy the javascript call from the browser to your
webserver as https and you retrieve the show_afs_search.js script on
your own. The problem with that is we may change the javascript on
the google.com servers at anytime and if our .js page as local URL
references, it will break completely.
The easiest way I'm aware of is doing the XML transforms.
There is a feature request to support https and we've submitted it to
engineering as issue #829046.
Best regards,
Google Enterprise Support
I have been dealing with this issue since CSE went live. The easiest
solution i've found is how www.printa.com implemented the code. In
fact, im going to do the same on www.bottleyourbrand.com.
I emailed customer support and just received a reply back from
Google. Here's what they stated.
--------------------------
Hi Scott-
Currently there is no way to get download the javascript using HTTPS
from google's website.
i.e, if you're using the iframe
http://www.google.com/afsonline/show_afs_search.js will work but
https://www.google.com/afsonline/show_afs_search.js wont.
One workaround you could try that involves a bit of coding is to proxy
the search query on your website.
That is, you could write a .php or .jsp page which collects the search
query from the user and submits a URL like the following to get the
raw XML coming back: In the example below, its a query for q=brand
http://www.google.com/cse?cx=010375552319769440266:adtz_wjhhmw&ie=UTF...
Once you have the raw xml, you could write an xslt to transform it to
anything/anyformat you chose.
http://www.google.com/coop/docs/cse/resultsxml.html
The other way is to proxy the javascript call from the browser to your
webserver as https and you retrieve the show_afs_search.js script on
your own. The problem with that is we may change the javascript on
the google.com servers at anytime and if our .js page as local URL
references, it will break completely.
The easiest way I'm aware of is doing the XML transforms.
There is a feature request to support https and we've submitted it to
engineering as issue #829046.
Best regards,
Google Enterprise Support
You could read full support article here
http://groups.google.com/group/google-custom-search-cse-and-your-site/browse_thread/thread/b06fc51e3ac168bc
Good Luck
Michael
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the reference to the XSLT. I may end up with the outside page, although the code so far is within a template.ascx which makes it a bit more painful. You would think with all their resources, they would publish 2 js for ssl and non ssl...
Thanks again,
Jo
Thanks again,
Jo
What exactly is the error you get.
Describe some steps to get this error.
Best
Mike