Hello,
I really like the Advance Software Popup. Thank you for offering it. I think it is conflicting with some javascript I have for quick ajax search located here:
http://www.oscommerce.com/community/contributions,3413/page,7The javascript for that contribution is:
var req;
function loadXMLDoc(key) {
var url="quickfind.php?osCsid=<?php echo tep_session_id();?>&keywords="+key;
// Internet Explorer
try { req = new ActiveXObject("Msxml2.XMLHTTP"); }
catch(e) {
try { req = new ActiveXObject("Microsoft.XMLHTTP"); }
catch(oc) { req = null; }
}
// Mozailla/Safari
if (!req && typeof XMLHttpRequest != "undefined") { req = new XMLHttpRequest(); }
// Call the processChange() function when the page has loaded
if (req != null) {
req.onreadystatechange = processChange;
req.open("GET", url, true);
req.send(null);
}
}
function processChange() {
// The page has loaded and the HTTP status code is 200 OK
if (req.readyState == 4 && req.status == 200) {
// Write the contents of this URL to the searchResult layer
getObject("quicksearch").innerHTML = req.responseText;
}
}
function getObject(name) {
var ns4 = (document.layers) ? true : false;
var w3c = (document.getElementById) ? true : false;
var ie4 = (document.all) ? true : false;
if (ns4) return eval('document.' + name);
if (w3c) return document.getElementById(name);
if (ie4) return eval('document.all.' + name);
return false;
}
window.onload = function() {
getObject("keywords").focus();
}
I think this may be interfering with window.onload in lightbox.js
function addLoadEvent(func)
{
var oldonload = window.onload;
if (typeof window.onload != 'function'){
window.onload = func;
} else {
window.onload = function(){
oldonload();
func();
}
}
}
I get the following error in IE:
"Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus."
Any tips on how to solve this issue would be greatly appreciated. I know you also offer the Ajax search code but I like this one better because it searches for all words in title and does not use auto suggest.
Thanks.
Smoky