PDA

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


JustMe
11-09-2006, 03: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
11-09-2006, 03: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
11-09-2006, 04: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
11-09-2006, 04: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.