Loading ...
Sorry, an error occurred while loading the content.

Re: YAHOO.widget.Layout dynamic content

Expand Messages
  • yui_code
    Thanks Caridy for the help, the issue is solved. ... definitelly ... will ... displayed, ... function. ... through ... content, ... using ... supports ... data
    Message 1 of 5 , Jan 6, 2009
    • 0 Attachment
      Thanks Caridy for the help, the issue is solved.

      --- In ydn-javascript@yahoogroups.com, "Caridy Patino" <caridy@...>
      wrote:
      >
      > Hey, I don't have an answer for you. I never tried it, but
      definitelly
      > you have an invalid markup in that page (DIV wrapping TD), and FF
      will
      > try to normalize that content for sure.
      >
      > Also I never tried to use the TD as the layout markup, you will have
      > to try it, or just do it in the traditional way using the YUI GRIDS.
      >
      > P.S. the general idea is OK, but I recommend you to use the Layout
      > AJAX Build-in feature, to load the content of the left/right/center
      > unit using the YUI Connection Manager, using the Dispatcher as the
      > main transponder, and things should be easier.
      >
      > Best Regards,
      > Caridy
      >
      > --- In ydn-javascript@yahoogroups.com, "yui_code" <yui_code@> wrote:
      > >
      > > Hi Caridy,
      > >
      > > Let me write the exact problem with code.
      > >
      > > This is the html of the main page where three columns are
      displayed,
      > > the content of the columns are fetched using "getTabContent"
      function.
      > >
      > > <div>
      > > <div>
      > > <table width="100%" height="100%" cellpadding="0"
      > > cellspacing="5" border="0" bgcolor="#FFFFFF">
      > > <div id="divlayout">
      > > <tr>
      > > <!-- Left Column -->
      > > <td width="33%" valign="top">
      > >
      > >
      > > <div id="leftcolumn">
      > > Loading....
      > > </div>
      > >
      > > </td>
      > > <!-- Center Column -->
      > > <td width="33%" valign="top">
      > >
      > > <div id="centercolumn">
      > > Loading....
      > > </div>
      > >
      > > </td>
      > > <!-- Right Column -->
      > > <td width="33%" valign="top">
      > >
      > >
      > > <div id="rightcolumn">
      > > Loading....
      > > </div>
      > >
      > > </td>
      > > </tr>
      > > </div>
      > > </table>
      > >
      > >
      > > </div>
      > > </div>
      > >
      > >
      > > Here getcontent.php page has code which reads some remote url
      through
      > > curl and prints in table format.
      > >
      > > <script type="text/javascript">
      > > function getTabContent() {
      > > var url = "getcontent.php?column=letcolumn";
      > > YAHOO.plugin.Dispatcher.fetch('leftcolumn',url);
      > > }
      > >
      > > getTabContent();
      > > </script>
      > >
      > >
      > > This is the layout manager code.
      > >
      > > <script type="text/javascript">
      > > (function() {
      > > var Dom = YAHOO.util.Dom,
      > > Event = YAHOO.util.Event,
      > > panel, showing = false;
      > >
      > > Event.onDOMReady(function() {
      > > var layout = new YAHOO.widget.Layout('divlayout',{
      > > units: [
      > > { position: 'left', header: 'Left', width: 400,
      > > body: 'leftcolumn', resize: true, gutter: '5px', collapse: true,
      > > close: true, collapseSize: 50, scroll: true, animate: true },
      > > { position: 'center', header: 'Center',
      > > body: 'centercolumn', gutter: '5px', scroll: true },
      > > { position: 'right', header: 'Right', width: 200,
      > > resize: true, body: 'rightcolumn', gutter: '5px', collapse: true,
      > > close: true, collapseSize: 50, scroll: true, animate: true }
      > > ]
      > > });
      > > layout.render();
      > > });
      > >
      > > })();
      > > </script>
      > >
      > >
      > > Now if i comment the code which reads the remote url(in <table>
      > > format) in getcontent.php and replace it with some static
      content,
      > > the layout manager works perfectly in IE(Not in mozilla though).
      > >
      > > Dont know if i am doing some silly mistake, is it because i am
      using
      > > table format inside div?
      > >
      > > Thanks
      > >
      > > --- In ydn-javascript@yahoogroups.com, "Caridy Patino" <caridy@>
      > > wrote:
      > > >
      > > > Hello,
      > > >
      > > > I really don't understand the problem.
      > > >
      > > > But anyway, the layout 2.6 and the dispatcher 2.0 already
      supports
      > > > full integration. Here is an example:
      > > >
      > > > http://bubbling-library.com/sandbox/yui2/dispatcher/layout.html
      > > >
      > > > Let me know if you need more help with this.
      > > >
      > > > Best Regards,
      > > > Caridy Patino (caridy at yahoo-inc.com)
      > > > Yahoo! LATAM
      > > >
      > > > --- In ydn-javascript@yahoogroups.com, "yui_code" <yui_code@>
      wrote:
      > > > >
      > > > > Hi,
      > > > >
      > > > > I am using layout manager for displaying left,center,right
      > > columns.
      > > > > The data in the columns is fetched by using dispatcher.
      > > > >
      > > > > The problem is that in the data in left column is coming
      > > dynamically
      > > > > by reading a remote url through curl, if i display the data
      > > without
      > > > > using layout manager then dispatcher works properly and the
      data
      > > is
      > > > > displayed in the column(On top of layout manager tabview is
      > > used).
      > > > > But when i write this code, the dynamic data is not loaded,
      > > static
      > > > > data is loaded though.
      > > > >
      > > > > (function() {
      > > > > var Dom = YAHOO.util.Dom,
      > > > > Event = YAHOO.util.Event,
      > > > > panel, showing = false;
      > > > >
      > > > > Event.onDOMReady(function() {
      > > > > var layout = new YAHOO.widget.Layout('divlayout',{
      > > > > units: [
      > > > > { position: 'left', header: 'Left', width:
      400,
      > > > > body: 'leftcolumn', resize: true, gutter: '5px', collapse:
      true,
      > > > > close: true, collapseSize: 50, scroll: true, animate: true },
      > > > > { position: 'center', header: 'Center',
      > > > > body: 'centercolumn', gutter: '5px', scroll: true },
      > > > > { position: 'right', header: 'Right', width:
      200,
      > > > > resize: true, body: 'rightcolumn', gutter: '5px', collapse:
      true,
      > > > > close: true, collapseSize: 50, scroll: true, animate: true }
      > > > > ]
      > > > > });
      > > > > //layout.loadContent();
      > > > > layout.render();
      > > > > });
      > > > >
      > > > > })();
      > > > >
      > > > > Can anyone tell me what i am doing wrong here?
      > > > >
      > > > > Thanks
      > > > >
      > > >
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.