0

Layout manager Dynamically load content

Hello

Can somebody please point me in the right direction, preferably with an example of how to load content into the center layout unit dynamically.
I have a layout with three ayout units, left and center defined as follows
layout = new YAHOO.widget.Layout({
units: [
{ position: 'top', height: 50, body: 'top1', header: 'Top', gutter: '5px'},
{ position: 'left', width: 150, resize: true, body: 'left1' },
{ position: 'center', body: 'center1' }
]

and my html markup is as follows
<body class=" yui-skin-sam">
<div id="top1">Top Panel</div>
<div id="left1">Left Panel
<input name="" type="button" value="Load Content A" onClick="loadContent('file1.php');">
<br/>
<input name="" type="button" value="Load Content B" onClick="loadContent('file2.php');">
</div>
<div id="center1">Content Panel</div>
</body>

I would like to be able to create a function, loadContent, that will place the content of the passed url into the center layout unit.

Thanks in advance

Andrew

by
1 Reply
  • Hi Andrew,

    The best place to ask this question is the YDN-Javascript Yahoo! group. That's where the YUI community hangs out.

    Thanks,

    Tom
    Yahoo! Developer Network
    0

Recent Posts

in General Discussion at YDN