PDA

View Full Version : open URL



Kurt Schrauwen
10-25-2010, 09:10 AM
Hey All,

I want to open an external URL into a tabpage when I click a menu option.
Can anyone help me, I can't seem to find the answer ?

Thanks,
Kurt

richard.milone
10-25-2010, 12:06 PM
Can you clarify a bit more? Do you want to:

1) have a link on the navigation tree that opens an external url into a new tab in the portal, like the External Links-->CNX Corporation example?
2) have a menu button within your application be able to launch a new tab on the portal and point to an external link?
3) have a menu button within your application be able to launch into a tab or panel within your application that points to an external link?

rkanemeier
10-25-2010, 05:30 PM
I have an additional one for you Richard:

4. use FusionChart link="" property to launch a new tab or pop-up.

The native FusionChart way is to put "n-" in front of the url in the link property. but i have to include a userid and password in the URL to get past the portal authority.



dataSets(Dta#).vvlink = 'n-/valence-2.1/vvlogin.pgm?user=fake' +
'&password=fake&environment=2&option=1007&portal=false';


Not trying to hijack the thread but I've been trying to figure out a work around on this one for a few days.

Kurt Schrauwen
10-26-2010, 05:15 AM
Hai Richard,

Wat I want to do is your number two.
2) have a menu button within your application be able to launch a new tab on the portal and point to an external link?

If this isn't working I wan to try number tree

3) have a menu button within your application be able to launch into a tab or panel within your application that points to an external link?

Regards,
Kurt

richard.milone
10-26-2010, 08:30 AM
For number 2, if the external link is static all you would need to do is set up the link as an option, similar to the examples shown on the nav tree under External Links. Then in your program you would use the Valence.tab.launchTab method to start that tab from any program as if the user had clicked on it in the nav tree. Check the Valence API Docs for how to use the Valence.tab.launchTab method. If your link isn't static then let me know, I'd have to think about that best way to do that.

Kurt Schrauwen
10-26-2010, 09:17 AM
Hai Richard,

Yes this is dynamic, data is comming out of the database

richard.milone
10-26-2010, 08:26 PM
Put this function in your program:


var launchNewUrl = function(title, url) {
parent.tabPanelMain.add({
iconCls: 'asterisk_orange',
title: title,
xtype: 'iframepanel',
defaultSrc: url,
loadMask: true,
closable: true
}).show();
};
To call it you just pass in a title for the portal tab and a url, like:


launchNewUrl('Yahoo', 'http://www.yahoo.com');