PDA

View Full Version : how to user setUrl load a link for layout



JustMe
9 Nov 2006, 12:48 AM
layout.add('north', new YAHOO.ext.ContentPanel('files', {title: ''files', fitToFrame:true}));
fsuggested = layout.add('east', new YAHOO.ext.ContentPanel('suggested', {title: 'Suggested Feeds', fitToFrame:true}));

if a link in layout files

google (http://www.google.com/)



onLoad : function(flink){
fsuggested.setUrl(flink, null, true);
}

i do this in 'suggested' there is nothing why???????
but


onLoad : function(flink){
fsuggested.setContent(flink);
}

i can see 'http://www.google.com' in suggested.
who can help me ,to tell me hoe to user 'setUrl '


thinks,, :oops:

Animal
9 Nov 2006, 12:51 AM
setContent sets the innerHTML of an element.

To go cross-domain, you're going to need an iframe. Check jack's latest RSS feed viewer.

JustMe
9 Nov 2006, 1:06 AM
yes! thinks
setContent just a test.I want to kown how to load for layout?
if addtab can succeed!but just a layout

Animal
9 Nov 2006, 1:32 AM
eg:



var myContentPanel = new YAHOO.ext.ContentPanel("theId",
{
title:"Contains loaded content",
autoCreate:true,
fitToFrame:true
});
myContentPanel.setUrl(urlOnServerDomain, { param:"value" }, true);
this.layout.add("north", myContentPanel);
northRegion.showPanel(this.id + "theId");


Remember that you can't get google.com this way, only pages from the server which served the page.