PDA

View Full Version : Javascript popup focus


Frosty_spl
11-02-2006, 01:28 PM
I need to make a popup stay in focus, (up all the time). Im triggering it through flash. Would I put the code in flash, or in the HTML that is popped up?

I have popup windows for my portfolio section of my website. I need the popup to not go under the browser window, and stay in focus.

also, is this what would do it? onBlur="window.focus()"

my flash code is:on (release) {
getURL ("javascript:openNewWindow('portfolio/clc1.html','thewin','height=413,width=533,toolbar= no,scrollbars=yes');");
}

my HTML code is:<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
popup=window.open(URLtoOpen, windowName, windowFeatures);
}
</script>

Frosty_spl
11-02-2006, 02:35 PM
I think i figured it out, but now it says i didnt terminate the string literal properly?

on (release) {
getURL ("javascript:openNewWindow('portfolio/clc1.html','thewin','height=413,width=533,toolbar= No,location=No,scrollbars=No,status=No,resizable=N o,fullscreen=No'); NewWindow.focus();
void(0);");
}

anonymous
11-02-2006, 03:13 PM
Is there in fact a physical linebreak between NewWindow.focus(); & void(0); in your line of code?

If so, try removing it.

Frosty_spl
11-02-2006, 03:43 PM
so i took off the void part at the end, and it worked.

There was a line break that flash put there. I couldnt bring it back up to the other line.

Is keeping a popup on top at all times even possible?