External Link-to Window

linkToWindow -- Specifies the window to use to open all external links.

Description

This option can be used to direct hyperlinks out of the player to a targeted window. This option is set to "_blank" by default. When this option is changed, Wimpy directs the 'target"for the link to the defined window name.

You can also use this option to direct the data contained in the <link> tag of your XML playlist to Javascript. See the "Redirecting link to Javascript" section below.

Hyperlinks out of the player include:

infoButtonAction

If the "infoButtonAction" is set to "Link to Page" (gotoURL) the resulting page will open in the window defined for this option.

 

clickWindowAction

If clickWindowAction is set to "Link to Page" (gotoURL) the resulting page will open in the window defined for this option.

 

onTrackComplete

If onTrackComplete is set to "Go to Page" (gotoURL) the resulting page will open in the window defined for this option.

 

 

Usage

As HTML option:

wimpy.swf?linkToWindow=_self

As Wimpy Configs Option:

<linkToWindow>whatever</linkToWindow>

As Javascript Option:

wimpyConfigs.linkToWindow="mainWindow";

 

 


NOTE: Internet Explorer only recognizes lowercase characters when using "standard" window naming conventions such as _blank, _parent, _self and _top.

 


NOTE: If Wimpy is being opened in a popup window and you want to reference the page (or window instance) that opened Wimpy, you will need to explicitly set the main-page's "window name" using javascript. Since the only way to reference the main-page (or window instance) that opened the pop up is to give it a name that you can call using standard HTML. Some folks may be familiar with the javascript "window.opener" feature, but since our "linkToWindow" option only allows for a standard A HREF TARGET="whatever" and does not use Javascript to call or target a window, we need to pre-define the main-pages's window name so that Wimpy can reference the window name using out "linkToWindow" option.

Sub-Note: When we say "main page" we also refer to "window instance" -- the reason we say both is because the "window instance" is the open browser window, if a person clicks on a link on the "main page" they will go to another page your your site, but a new browser window will not open... the same browser window will stay open, or, the same browser window instance will stay open, the user has just gone to another page and they are using the same browser window instance. Each browser window has a set of things that the browser keeps track of (attributes)... that is why when you click on the "back" or "next" or "refresh" button in the browser, other browser windows don't change, only the browser window instance that you are focusing on changes. One of the browsers attributes that needs to be set explicitly is the name of the instance.

Here is some Javascript code that you can use to explicitly set the window name. Put this code in the "head" of the page that is pops up Wimpy, then set our "linkToWindow" option to whatever you decide to use for winow.name="whatever." In this example, we've used "mainWindow" -- keep in mind that this is case-sensitive.

<HTML>
<HEAD>

<SCRIPT TYPE="text/javascript">
window.name='mainWindow';
</SCRIPT>


</HEAD>
<BODY>
your content
</BODY>
</HTML>

Where "mainWindow" is the name we set for the window instance.

 

Redirecting link to Javascript

If the "linkToWindow" option is set to "javascript" the data contained in the <link> tag of an XML playlist is redirected to the handleLinkClick event handler. So when a user clicks on the video window, or the link arrow to the right of a playlist item, the data contained within the <link> tag is sent to the "handleLinkClick" function within rave.js

 

<script language='javascript' src='rave.js'></script>
<div id="flashcontent">This DIV contents to be replaced by Rave.</div>
<script language="JavaScript" >


// Wire the linkToWindow to javascript:
defaultWimpyConfigs.linkToWindow="javascript";

// Enable handler events:
enableWimpyEvents = true;

// Re-write the handler function:
function handleLinkClick(returnedObject){
   alert(returnedObject);
}


// Set the default playlist:
defaultWimpyConfigs.wimpyApp = "playlist.xml";

// Render the player using the default configs:
makeWimpyPlayer();

</script>

See examples 8 and 9 in the Rave download package for details on how to set up this functionality.

 

 

.

 

Wimpy Player Documentation
Copyright ©2002-2008 Plaino LLC. All rights reserved.
Use of this website signifies your agreement to the Terms of Use.