...

View Full Version : Unable to minimize pop up window / window.open



Felixd
10-31-2006, 07:17 PM
Hi,

Unable to minimize the pop up window.
It can be closed.

Actual example can be seen:
http://rakuteapots.com/assets/image_test.html

The script was provided thanks to the user Spookster listed in the forum:
http://www.codingforums.com/showthread.php?t=1625


The problem I am encountering is the user is not able to minimize the popup window. If you try, it will automatically come backup.
How can that be adjusted?

The code is:
<!--//
function imageView(imgFile,imgTitle,imgWidth,imgHeight,winPosX,winPosY){
preview = window.open("","","resizable=no,toolbar=no,scrollbars=no,menubar=no,status=no,directories=no,width="+imgWidth+",height="+imgHeight+",left="+winPosX+",top="+winPosY+"");
preview.document.write('<html><head><title>'+imgTitle+' - Click to close - <\/title><\/head>'
+'<body onBlur="self.focus();" marginWidth="0" marginHeight="0" topmargin="0" leftmargin="0">'
+'<center>'
+'<a href="javascript:self.close()">'
+'<img border="0" alt="Image loading please wait...." src="'+imgFile+'" width="'+imgWidth+'" height="'+imgHeight+'">'
+'<\/a><\/center>'
+'<\/body><\/html>');
preview.document.close();
}
//-->
</script>


Thanks,

Felix

_Aerospace_Eng_
10-31-2006, 07:38 PM
You need to change where it says resizable=no to resizable=yes

Spookster
10-31-2006, 08:07 PM
Actually if you do not want the popup window to retain focus until it is closed then you need to remove this part:

onBlur="self.focus();"

I set this up so that the popup image would always be in front until it is closed.

Felixd
10-31-2006, 08:46 PM
Hi _Aerospace_Eng_...

I made the change, uploaded and tested.

The window continues bouncing back up when ever the user tries minimizing it.

Felixd
10-31-2006, 08:53 PM
Hi Spookster,

Removed the >> onBlur="self.focus();"

It resolved the minimizing problem.

However, the image is not longer occupying the whole window as it did before. How can I keep some of those parameters (and which one) to have the image fill the entire window?

Thanks

Spookster
10-31-2006, 08:55 PM
put back everything except the onBlur part.

Felixd
10-31-2006, 08:58 PM
Hey Spookster...

I just re-did it... I had removed the entire line including the body parameters... I see now...it makes sense. So I can actually manipulate the body within the pop up window... Cool

It works perfectly now...Kudos to you... Thank you, thank you...

Felix



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum