Click to See Complete Forum and Search --> : client's browser or the code?


chrismond
11-05-2003, 06:03 PM
I was wondering if anyone could help me. Basically, i've got a script, located in the <head></head> tag that instructs the browser to load a new "sized" page in a new window, then closes the original one. The problem I'm running into is that some people using IE have notified me that it fails to launch the new sized window, then it closes the original browser, leaving you with nothing. Could this be a result of custom security issues? Browser Option Issues? Pop-up Blocker issue? Any help or insight would be greatly appreciated!

Here is the script I'm using, and once again, it's placed within the <HEAD></HEAD> tag.



<SCRIPT TYPE="text/javascript">
<!--

function popit(theURL, w, h){ver = parseInt(navigator.appVersion.substring(0,1)); newWin=window.open(theURL,"Rimfire","width="+w+",height="+h+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory =no,"); if ((!((navigator.appName == "Netscape")&&(ver==2))) && (!((navigator.appName == "Microsoft Internet Explorer")&&(ver<4)))){ setTimeout("if (newWin) newWin.focus();",1000);}}

function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}

function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}

var preloadFlag = false;
function preloadImages() {
if (document.images) {
hmb_cat_explore_over = newImage('images/hmb_cat_explore-over.gif');
hmb_cat_fun_over = newImage('images/hmb_cat_fun-over.gif');
hmb_cat_dining_over = newImage('images/hmb_cat_dining-over.gif');
hmb_cat_lodging_over = newImage('images/hmb_cat_lodging-over.gif');
hmb_cat_shopping_over = newImage('images/hmb_cat_shopping-over.gif');
hmb_cat_weddings_over = newImage('images/hmb_cat_weddings-over.gif');
preloadFlag = true;
}
}

// -->
</SCRIPT>