Search code examples
ajaxsearchgoogle-custom-search

Google Search CSE open in same page - AJAX / iframe overlay


I've got the google cse on my site to display results in the right place but when i click on them it opens in a new page, i want it to open in the same page but can't figure it out.

All the files are uploaded and the page can be found at

http://www.alwaystwisted.com/sandbox/stagecraft/template.html

Thanks in advance

Regards

Stu


Solution

  • I found the info and changed some of my javascript (the last bit within the page)

    function OnLoad() { var cseo=new CSEOverlay("016190657123569369479:3uma0emyzom", document.getElementById("searchbox_016190657123569369479:3uma0emyzom"), document.getElementById("results_016190657123569369479:3uma0emyzom")); cseo.searchControl.setLinkTarget(GSearch.LINK_TARGET_PARENT); } GSearch.setOnLoadCallback(OnLoad);

    and it works...