質問
JavaScript to open new browser window
I have an intranet page from which users can select various
Captivate 2 movies. When they select the link I use a simple
JavaScript function to open an appropriately sized window to run
the movie in, as they are of various sizes and some so large I need
to do away with toolbars and the like.
To save the users having to return to the Intranet page to open another movie I want to offer them a button at the end of a movie which would have the same effect - open a new browser window appropriately sized for the particular movie they choose.
This should be easy: create a button, choose Execute JavaScript and put the script in the box. Only it doesn't work.
Scouring the forums I found a few potential answers, of which the most promising seemed to be to put the function in the standard.js file that Captivate 2 creates and then call the function from the Execute JavaScript dialogue. I also tried putting the function into the HTML that is created when the Captivate is published. Also didn't work.
I've tried various permutations in the Execute JavaScript dialogue too. Do I or do I not need to preface the line with javascript: or javascript:function? I tried all options without success.
It would help my nerves if every time I republish a new attempt it didn't overwrite standard.js!
If I could solve this I could also probably solve my other requirement to close the browser window when the movie stops - I gave up on that last year as not being worth the effort.
Any help will be very gratefully received.
WizardOfWellingboro
To save the users having to return to the Intranet page to open another movie I want to offer them a button at the end of a movie which would have the same effect - open a new browser window appropriately sized for the particular movie they choose.
This should be easy: create a button, choose Execute JavaScript and put the script in the box. Only it doesn't work.
Scouring the forums I found a few potential answers, of which the most promising seemed to be to put the function in the standard.js file that Captivate 2 creates and then call the function from the Execute JavaScript dialogue. I also tried putting the function into the HTML that is created when the Captivate is published. Also didn't work.
I've tried various permutations in the Execute JavaScript dialogue too. Do I or do I not need to preface the line with javascript: or javascript:function? I tried all options without success.
It would help my nerves if every time I republish a new attempt it didn't overwrite standard.js!
If I could solve this I could also probably solve my other requirement to close the browser window when the movie stops - I gave up on that last year as not being worth the effort.
Any help will be very gratefully received.
WizardOfWellingboro
