Skip to main content
Known Participant
August 16, 2012
Question

Script to open a window

  • August 16, 2012
  • 2 replies
  • 1099 views

I have a problem that is probably very easy for someone who knows more than I do to fix.

Our topics in RoboHelp have a "hyperlink" that runs a little Javascript script that puts together a link that opens a window and runs a Flash file (Captivate).  We have clients who want to run it in their mobile devices.  They are willing to install Puffin so they can run Flash. 

The problem is that the script is written to run the Flash file in a separate window, which you can't do in Puffin.  I'd like it to be able to run inside the WebHelp screen, in place of the topic content, in what I assume is a frame.  And I can't seem to get the script to work.  This is the original one.  Can anyone help? (I tried adding _Parent and _self but brought up an error message.)

//<![CDATA[

language="JavaScript">

<!--

function launchwin()

{

var SiteName="www.[site]";

var TipName="[topic name]";

window.open ("http://"+SiteName+"/"+TipName+".htm","cool","width=1020,height=610,location=no,toolbar=no");

}

//-->

//]]>

This topic has been closed for replies.

2 replies

Willam van Weelden
Inspiring
August 17, 2012

Hi,

document.location='http:// '=SiteName'/'TipName+'.htm';

This will open the file in the current window. Be sure to add a back button to the opened document.

Greet,

Willam

Known Participant
August 17, 2012

Thank you so much, William.

The line didn't work exactly as you typed it, but I touched it up with the double quotes used here, and it works great.

My only problem now is that it doesn't work in Puffin browser, which was the purpose of making the change in the first place.  I guess I'll have to try the Puffin forums for that.

Thanks again!

Willam van Weelden
Inspiring
August 17, 2012

I'm not familiar with Puffin, but I would expect the browsers to simply execute the JavaScript. Alternatively, you can also create a regular hyperlink to the correct file. That is sure to work.

Greet,

Willam

RoboColum_n_
Legend
August 17, 2012

There isn't a great deal of scripting know how in this forum. Hopefully someone will be able to chip in, but didn't want you to feel we were ignoring you