• flickr
  • linkedin
  • twitter
  • rss
Captivate replacing itself with [object] when running Javascript

Captivate replacing itself with [object] when running Javascript

I’ve been trying to run javascript through Captivate to do some nice popup windows for a sub-simulation.

When the javascript finally works, it’d replace the main clip with [object] – ie. it would run the URL in its own URL, so you’d see ‘[object] displayed on screen, rather than the CP movie! Pretty silly.

Anyway, easy fix: stick your ‘window.open’ in a variable.

var simmy = window.open("sims/sim1.htm", "simWindow","status=0,menuBar=0,location=0,toolBar=0,directories=0,resizable=0,scrollbars=0,height=620,width=980");

ALSO you need to do this through an advanced action, not just through an ‘execute javascript’ on success action from a button – even if the advanced action is just running this function. Classic Captivate.

props to this guy for doing all the pain on this one:

Tech Reference:

Larry's a 30-something chap interested in travel, being a dork and changing the world via less boring training.

Leave a reply