Skip to main content
September 23, 2008
Question

window.open javascript on button causes parent window to display blank page

  • September 23, 2008
  • 2 replies
  • 1434 views
In Captivate 3, I've created a Text button that executes the following Javascript:

window.open('stakeholder_part2.htm','', 'fullscreen=yes, scrollbars=auto');

The Javascript works perfectly, but when it executes, the page in the parent window goes blank except for the word "object" in square brackets. Hitting the back button in my browser navigates back to the Captivate movie.

I've tried every combination of settings I can think of in the button dialog. Currently I have "top" selected in the window dropdown, and "Continue playing project" disabled. The only setting that didn't work at all is "New" ("Current" and "Parent" both generated the results described above).

Could this have something to do with the fact that the javascript launches the new window in fullscreen mode?
quote:

Text
This topic has been closed for replies.

2 replies

Participating Frequently
September 25, 2008
You could try wrapping your function in a call to void(), which basically says "don't return a value when evaluating this".

It would look like this:

void(window.open('stakeholder_part2.htm','', 'fullscreen=yes, scrollbars=auto'));

Unless you really want to open a different new window each time the function is called, you should also specify a name for the new window, as in:

void(window.open('stakeholder_part2.htm','newWin', 'fullscreen=yes, scrollbars=auto'));

The browser will check for an open window with this name and show the page in that window if it's still open.
RoboWizard
Inspiring
September 24, 2008
Hi Steve

See if the following page offers any clues:
Click here

Cheers... Rick