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

How to make panel in array ?

Expand Messages
  • norul
    Hi, I would like to ask about the panel container to be in an array which the item/panel (panel1) is counting/looping from the database (mysql and php) so how
    Message 1 of 1 , Oct 8, 2007
      Hi, I would like to ask about the panel container to be in an array
      which the item/panel (panel1) is counting/looping from the database
      (mysql and php)
      so how can i do it the array?

      Example:
      <script>
      YAHOO.namespace("example.container");
      function init() {
      // Instantiate a Panel from markup

      YAHOO.example.container.panel1 = new YAHOO.widget.Panel("panel1", {
      width:"320px", visible:false, draggable:false,constraintoviewport:true
      } );
      YAHOO.example.container.panel1.render();
      YAHOO.util.Event.addListener("show1", "click",
      YAHOO.example.container.panel1.show, YAHOO.example.container.panel1,
      true);
      YAHOO.util.Event.addListener("hide1", "click",
      YAHOO.example.container.panel1.hide, YAHOO.example.container.panel1,
      true);
      }
      YAHOO.util.Event.addListener(window, "load", init);
      </script>

      -------------------------------------------------------------

      <div id="container2">
      <div>
      <a href="#" id="show1">Schedule</a>
      <!-- <button id="hide1">Hide panel1</button>-->
      </div>
      <div id="panel1">
      <div class="hd">Edit Trip Schedule</div>
      <div class="bd"><form action="" method="post"
      name="form_calendar">
      <table width="350px" border="0">
      <tr>
      <td width="100px">Start Trip</td>
      <td width="250px"><input name="trip_start" type="text"
      id="trip_start" size="15" />
      <a
      onclick="cal.select(document.forms['form_calendar'].trip_start,'anchor1','MM/dd/yyyy');
      return false;" name="anchor1" id="anchor1" ><img
      src="calendar_default.gif" width="18" height="18"/> </a></td>
      </tr>
      <tr>
      <td>Start End</td>
      <td><input name="trip_end" type="text" id="trip_end"
      size="15" />
      <a
      onclick="cal.select(document.forms['form_calendar'].trip_end,'anchor2','MM/dd/yyyy');
      return false;" name="anchor2" id="anchor2" ><img
      src="calendar_default.gif" width="18" height="18"/> </a></td>
      </tr>
      <tr>
      <td> </td>
      <td><label>
      <input name="button" type="submit"
      class="buttonstyle" id="button" value="Submit" />
      </label></td>
      </tr>
      </table>
      </form></div>
      <div class="ft"></div>
      </div>

      </div>

      ---------------------------------------------------------------------
      the result will display, if the data have 2-3 data, it will be looping
      and the panel also
      but mine, for the first data is working, then the second and after not
      working.how i make it in array?
    Your message has been successfully submitted and would be delivered to recipients shortly.