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

How to change the contents of panel after it was rendered?

Expand Messages
  • daveb662001
    Hello! I am new to YUI, I only used it for a couple of days now. This is what I need to do: 1) create a floating panel (this is easy with YUI container, like
    Message 1 of 3 , Mar 1, 2008
    • 0 Attachment
      Hello!

      I am new to YUI, I only used it for a couple of days now.

      This is what I need to do:
      1) create a floating panel (this is easy with YUI container, like here:
      http://developer.yahoo.com/yui/examples/container/panel_clean.html)

      2) keep adding new DOM elements inside the already rendered panel.

      Basically I want to simulate the PyTTY window.
      The appearance of PyTTY window can be faked by creating and skinning
      the floating div with YUI container utility (blue menu bar, black
      background, white text, etc..)

      But I need to be able to append new lines of text inside this panel
      after it has been created. I don't need to allow the user to 'type'
      inside this simulated PyTTY, only to see the new lines of text added.

      I already have an array logMessages with the lines of text that I want
      to add, I will use logMessages.shift() to get one line at a time and
      add it. This is done with setInterval("addLine()", 500).
      So the idea is to simulate the PuTTY window in which new log messages
      are added every 1/2 second. This is to simulate some activity during
      software upgrade.

      I just cannot find a way to append DOM node the the already rendered
      panel.

      Thank you for your help.
    • Satyam
      It is not obvious from the documentation at first sight but Panel has many more methods than shown on the index. The extra methods are listed at the end of
      Message 2 of 3 , Mar 1, 2008
      • 0 Attachment
        It is not obvious from the documentation at first sight but Panel has many
        more methods than shown on the index. The extra methods are listed at the
        end of the methods section as inherited from the other components it
        inherits from, one of the is appendToBody:

        http://developer.yahoo.com/yui/docs/YAHOO.widget.Module.html#appendToBody

        Satyam

        ----- Original Message -----
        From: "daveb662001" <london@...>
        To: <ydn-javascript@yahoogroups.com>
        Sent: Saturday, March 01, 2008 3:22 PM
        Subject: [ydn-javascript] How to change the contents of panel after it was
        rendered?


        > Hello!
        >
        > I am new to YUI, I only used it for a couple of days now.
        >
        > This is what I need to do:
        > 1) create a floating panel (this is easy with YUI container, like here:
        > http://developer.yahoo.com/yui/examples/container/panel_clean.html)
        >
        > 2) keep adding new DOM elements inside the already rendered panel.
        >
        > Basically I want to simulate the PyTTY window.
        > The appearance of PyTTY window can be faked by creating and skinning
        > the floating div with YUI container utility (blue menu bar, black
        > background, white text, etc..)
        >
        > But I need to be able to append new lines of text inside this panel
        > after it has been created. I don't need to allow the user to 'type'
        > inside this simulated PyTTY, only to see the new lines of text added.
        >
        > I already have an array logMessages with the lines of text that I want
        > to add, I will use logMessages.shift() to get one line at a time and
        > add it. This is done with setInterval("addLine()", 500).
        > So the idea is to simulate the PuTTY window in which new log messages
        > are added every 1/2 second. This is to simulate some activity during
        > software upgrade.
        >
        > I just cannot find a way to append DOM node the the already rendered
        > panel.
        >
        > Thank you for your help.
        >
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        > --
        > No virus found in this incoming message.
        > Checked by AVG Free Edition.
        > Version: 7.5.516 / Virus Database: 269.21.2/1305 - Release Date:
        > 29/02/2008 18:32
        >
        >
      • daveb662001
        Thank you. I did not even see that page before. I ll try the appendToBody now. ... has many ... at the ...
        Message 3 of 3 , Mar 1, 2008
        • 0 Attachment
          Thank you. I did not even see that page before.

          I'll try the appendToBody now.



          --- In ydn-javascript@yahoogroups.com, "Satyam" <satyam@...> wrote:
          >
          > It is not obvious from the documentation at first sight but Panel
          has many
          > more methods than shown on the index. The extra methods are listed
          at the
          > end of the methods section as inherited from the other components it
          > inherits from, one of the is appendToBody:
          >
          >
          http://developer.yahoo.com/yui/docs/YAHOO.widget.Module.html#appendToBody
          >
          > Satyam
          >
          > ----- Original Message -----
          > From: "daveb662001" <london@...>
          > To: <ydn-javascript@yahoogroups.com>
          > Sent: Saturday, March 01, 2008 3:22 PM
          > Subject: [ydn-javascript] How to change the contents of panel after
          it was
          > rendered?
          >
          >
          > > Hello!
          > >
          > > I am new to YUI, I only used it for a couple of days now.
          > >
          > > This is what I need to do:
          > > 1) create a floating panel (this is easy with YUI container, like
          here:
          > > http://developer.yahoo.com/yui/examples/container/panel_clean.html)
          > >
          > > 2) keep adding new DOM elements inside the already rendered panel.
          > >
          > > Basically I want to simulate the PyTTY window.
          > > The appearance of PyTTY window can be faked by creating and skinning
          > > the floating div with YUI container utility (blue menu bar, black
          > > background, white text, etc..)
          > >
          > > But I need to be able to append new lines of text inside this panel
          > > after it has been created. I don't need to allow the user to 'type'
          > > inside this simulated PyTTY, only to see the new lines of text added.
          > >
          > > I already have an array logMessages with the lines of text that I want
          > > to add, I will use logMessages.shift() to get one line at a time and
          > > add it. This is done with setInterval("addLine()", 500).
          > > So the idea is to simulate the PuTTY window in which new log messages
          > > are added every 1/2 second. This is to simulate some activity during
          > > software upgrade.
          > >
          > > I just cannot find a way to append DOM node the the already rendered
          > > panel.
          > >
          > > Thank you for your help.
          > >
          > >
          > >
          > >
          > >
          > >
          > > Yahoo! Groups Links
          > >
          > >
          > >
          > >
          > >
          > > --
          > > No virus found in this incoming message.
          > > Checked by AVG Free Edition.
          > > Version: 7.5.516 / Virus Database: 269.21.2/1305 - Release Date:
          > > 29/02/2008 18:32
          > >
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.