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

replace div content

Expand Messages
  • bill78b
    Hi Based on the selection of the panel from the select box , i like to place them in to the first div position ... Not having ant Idea to move forward ... Here
    Message 1 of 1 , May 27, 2009
      Hi

      Based on the selection of the panel from the select box , i like to
      place them in to the first div position ...

      Not having ant Idea to move forward ...

      Here is my Code ........

      <html>
      <head>

      <style type="text/css">
      body {
      margin:0;
      padding:0;
      }
      #container {height:15em;}
      .yui-skin-sam .yui-panel-container {
      position:relative;
      margin-bottom:10px;
      }

      </style>




      <link rel="stylesheet" type="text/css"
      href="http://yui.yahooapis.com/2.7.0/build/fonts/fonts-min.css">
      <link rel="stylesheet" type="text/css"
      href="http://yui.yahooapis.com/2.7.0/build/grids/grids-min.css">

      <link rel="stylesheet" type="text/css"
      href="http://yui.yahooapis.com/2.7.0/build/container/assets/skins/sam/co\
      ntainer.css">
      <script type="text/javascript"
      src="http://yui.yahooapis.com/2.7.0/build/yahoo-dom-event/yahoo-dom-even\
      t.js"></script>
      <script type="text/javascript"
      src="http://yui.yahooapis.com/2.7.0/build/dragdrop/dragdrop-min.js"></sc\
      ript>
      <script type="text/javascript"
      src="http://yui.yahooapis.com/2.7.0/build/container/container-min.js"></\
      script>




      <script>


      var hashT = new Object();
      hashT.panel1 = 'Survey';
      hashT.panel2 = 'CLM Suite';
      hashT.panel3 = 'Claim Charts';
      hashT.panel4 = 'Stock Ticker';



      YAHOO.namespace("example.container");

      function init() {

      // Instantiate a Panel from markup
      YAHOO.example.container.panel1 = new
      YAHOO.widget.Panel("panel1",{width:"490px",draggable:true});
      YAHOO.example.container.panel1.render();
      YAHOO.example.container.panel1.show();

      YAHOO.example.container.panel1.cfg.setProperty("underlay","none");

      YAHOO.util.Event.addListener
      (YAHOO.example.container.panel1.element, "mousedown",
      onCloseMouseDown);


      YAHOO.example.container.panel2 = new
      YAHOO.widget.Panel("panel2",{width:"490px",draggable:true});
      YAHOO.example.container.panel2.render();
      YAHOO.example.container.panel2.show();

      YAHOO.example.container.panel2.cfg.setProperty("underlay","none");


      YAHOO.util.Event.addListener
      (YAHOO.example.container.panel2.element, "mousedown",
      onCloseMouseDown1);



      YAHOO.example.container.panel3 = new
      YAHOO.widget.Panel("panel3",
      {width:"280px",draggable:false});
      YAHOO.example.container.panel3.render();
      YAHOO.example.container.panel3.show();

      YAHOO.example.container.panel3.cfg.setProperty("underlay","none");

      YAHOO.example.container.panel4 = new
      YAHOO.widget.Panel("panel4",
      {width:"280px",draggable:false});
      YAHOO.example.container.panel4.render();
      YAHOO.example.container.panel4.show();

      YAHOO.example.container.panel4.cfg.setProperty("underlay","none");





      }

      YAHOO.util.Event.addListener(window, "load", init);

      function addPanel(){

      var value = document.getElementById('panel').value;

      if(value == 'panel1'){

      YAHOO.example.container.panel1.show();
      }

      if(value == 'panel2'){

      if(hashT.panel1 == null){


      // document.getElementById('panel1').innerHTML = '
      panel2 content here ' ;
      }
      YAHOO.example.container.panel2.show();
      }

      if(value == 'panel3'){
      YAHOO.example.container.panel3.show();
      }
      if(value == 'panel4'){
      YAHOO.example.container.panel4.show();
      }
      }

      function onCloseMouseDown(){

      hashT.panel1 = null;
      }

      function onCloseMouseDown1(){

      hashT.panel2 = null;

      }
      </script>
      </head>

      <body class="yui-skin-sam">
      <table width="30%" border="0" cellspacing="1" cellpadding="2">
      <tr>
      <td nowrap="nowrap"><b> Select Panel : </b></td>
      <td width="4%"> </td>
      <td>
      <select id="panel" class="formfield">
      <option value=""></option>
      <option value="panel1">Survey</option>
      <option value="panel2">CLM Suite</option>
      <option value="panel3">Claim Charts</option>
      <option value="panel4">Stock Ticker</option>
      </select>
      </td>
      <td><input type="button" class= "formButton" value="addpanel"
      onClick="addPanel();">
      </tr>
      </table>


      <div id="doc3" class="yui-t6">
      <div id="hd">
      <div id="bd">
      <div id="yui-main">
      <div class="yui-b">

      <div class="yui-g" id="panel1">
      <div class="hd">Survey</div>
      <div class="bd">SurveySurvey</div>
      </div>

      <div class="yui-g" id="panel2">
      <div class="hd">CLM Suite</div>
      <div class="bd">CLM SuiteCLM Suite
      </div>
      </div>
      </div>
      </div>

      <div class="yui-b" id="panel3">
      <div class="hd">Claim Charts</div>
      <div class="bd">Claim ChartsClaim Charts
      </div>

      </div>
      <div class="yui-b" id="panel4">
      <div class="hd">Stock Ticker</div>
      <div class="bd">Stock TickerStock Ticker
      </div>
      </div>

      </div>
      </div>
      </div>


      </body>
      </html>

      Any Body Suggest me how can i proceed

      Thanks

      Bill
    Your message has been successfully submitted and would be delivered to recipients shortly.