Click to See Complete Forum and Search --> : Mac with (I.E.) specific window open issue


soundchaser01
08-29-2003, 10:54 AM
I'm trying to figure out what the deal is with a mac specific javascript issue. I have the code below...


function informUserIE() {

alertWin = window.open("alertWindow.htm", "alertWindow", "height=350,width=460")
alertWin.document.write("<html><head><title>Redirecting...<\/title>")

etc for window content...

alertWin.document.write("<tr><td colspan=2>Please Wait...<\/td><\/tr><\/table><\/div>")
alertWin.document.write("<\/body><\/html>")
setTimeout("connect()", 6000)
}

function connect() {
focus()
redirectUser()
}

function redirectUser() {
focus()
if(hasWindowsOS == true && hasIE == true) {
if(userResolution == "8x6") {
self.location.replace("indexWIE86.htm", "index")
}
else if(userResolution == "10x7") {
self.location.replace("resolutionDefault_WIE.htm", "index")
}
else {
self.location.replace("resolutionDefault_WIE.htm", "index")
}
}

and all I want to do... is generate a popup info window, that displays for several seconds, then focus() back to the window that opened it... which has just filled itself with a new page.

I was surprised to find a Mac with IE discrepency with this...
self.location.replace("resolutionDefault_WIE.htm", "index")
and I tried
document.loacation("x.htm")
and location.replace("x.htm")
and top.location.replace, document.location.replace, and document.open().... etc etc

I couldn't find the answer fast enough searching the net for "javascript mac window replace" etc

Have any ideas? I'm just about to go live with myself, and a friend of mine's site I'm doing for him - and this is the first Mac specific glitch I've run into (besides mac not supporting VBScript... Damn! That sucks!),

Thanks in advance for your time...

email me at wade@quantumtones.com with any ideas!

- Wade

www.quantumtones.com <http://www.quantumtones.com>

(coming very very soon :-)

Khalid Ali
08-29-2003, 04:43 PM
did you try using
window.location.href="...."

instead of replace(unless htere is a reason to use rrplace)?

second post the error if you get any(best way to find out about errors is use Netscape's built in utility)