Sign in to follow this  
donbruns

Opening A New Page In An Iframe

Recommended Posts

I am working with a dragnode chart. I am trying to set it up so that clicking on each node opens a new HTML page in an iFrame contained within a prettyPhoto lightbox.

 

I can get PrettyPhoto lighbox to load a static webpage into an iFrame using the following code...

 

 

FusionCharts("myChartId").addEventListener('BeforeLinkedItemOpen',

function() {

$.prettyPhoto.open('ajaxPage.html?iframe=true&width=70%&height=70%','','');

}

 

What I want to do is to replace "ajaxPage.html" with a variable page name, which I would pass from my XML file in the link= attribute. Something like...

 

 

<connector strength='1' label='test' from='1' to='2' arrowAtStart='0' arrowAtEnd='1' link='[???]' />

 

I have not been able to find any such documentation on the FusionCharts site. I'm sure this must be possible. But I just don't know how to do it.

 

Any advice you can offer would be greatly appreciated.

Share this post


Link to post
Share on other sites

Hi,

 

Could you please try providing the link in the following way to open it in a new window?

Ex:

<connector strength='1' label='test' from='1' to='2'  arrowAtStart='0' arrowAtEnd='1' link='<a href="http://www.fusioncharts.com" target="_blank">FusionCharts</a>' />

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

Hi,

 

Apologies for the inconvenience.

 

The last link format was the format for a HTML link that opens in a new window.

 

Please try using the following JavaScript link format to open it in a new window.

Ex:

<connector strength='1' label='test' from='1' to='2'  arrowAtStart='0' arrowAtEnd='1' link='n-http://www.fusioncharts.com' />

 

Please refer to the following link for further details on the above.

http://www.fusioncharts.com/docs/?DrillDown/LinkFormat.html

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

Thank you very much for your response. The code you provided opens a new webpage in a new window.

 

I'm trying to open a new webpage in a PrettyPhoto lightbox.

 

Any advice you can provide would be appreciated.

Share this post


Link to post
Share on other sites

Hi,

 

Please check with the example of Linked chart opening in jQuery prettyphoto for your reference.

Ref. path - FusionCharts v3.2.1 Download pack >> Code >> JavaScript >> Basics >> UsingLinkedCharts >> jqprettyphoto.html

 

You would need to use a similar JavaScript function to perform the same at your end. the basic method is mentioned here.

 

I hope this helps. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this