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

[ydn-javascript] YUI Tab refresh Problem

Expand Messages
  • Shanthimsc
    Hai All, I have used YUI tabs in my web page. I want to refresh the page while clicking the tab so that I can get the dynamic content for the tabs. For this, i
    Message 1 of 1 , Oct 28, 2009
    • 0 Attachment
      Hai All,

      I have used YUI tabs in my web page. I want to refresh the page while
      clicking the tab so that I can get the dynamic content for the tabs. For
      this, i have applied the following steps:

      <?php
      $selectedTab=$_GET['t'];
      if ($selectedTab=="New")
      execute qry1;
      else if ($selectedTab=="MarkDel")
      execute qry2;
      ele if ($selectedTab=="Censored")
      execute qry3;

      ?>
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <title>
      Text SMS
      </title>

      <link rel="stylesheet" type="text/css" href="tabview.css">

      <script type="text/javascript"
      src="build/yahoo-dom-event/yahoo-dom-event.js"></script>
      <script type="text/javascript"
      src="build/element/element-beta-min.js"></script>
      <!-- OPTIONAL: Connection (required for dynamic loading of data) -->
      <script type="text/javascript"
      src="build/connection/connection-min.js"></script>

      <!-- Source file for TabView -->
      <script type="text/javascript"
      src="build/tabview/tabview-min.js"></script>
      <script type="text/javascript">
      var myTabs = new YAHOO.widget.TabView("demoMsg");
      </script>


      <body class="yui-skin-sam" onselectstart="return false"
      oncontextmenu="return false" >



      <div id="demoMsg" class="yui-navset">
      <ul class="yui-nav">

      <li onClick="test1('New');"
      <?php
      if ((!isset($selectedTab)) || ($selectedTab ==
      "New"))
      echo "class=\"selected\"";

      ?>
      > ?t=New <em>New</em> </li>
      <li onClick="test1('MarkDel');"
      <?php
      if ($selectedTab == "MarkDel")
      echo "class=\"selected\"";
      ?>
      > ?t=MarkDel <em>Marked for deletion</em> </li>
      <li onClick="test1('Censored');"
      <?php
      if ($selectedTab == "Censored")
      echo "class=\"selected\"";
      ?>
      > ?t=Censored <em>Censored text SMS <?php echo " to "."
      ".$fullname; ?></em> </li>

      </ul>
      <div class="yui-content">
      <div>
      Tab1 content
      </div>
      <div>
      Tab2 content
      </div>
      <div>
      Tab3 content
      </div>
      </div>
      </div>
      </body>
      </html>


      The test1 function will send the active tab's name to php. Based on that
      Tab, qry will be executed and tab will be focused.

      I am able to refresh the tab's content but i have a problem in UI.
      Consider that you are tab2. Click on Tab3.Page is refreshed and instead of
      refreshing Tab3 alone, Tab1 & Tab2 also refreshed and it is loaded. How to
      avoid loading Tab1 & Tab3??
      Am helpless.:working:
      --
      View this message in context: http://www.nabble.com/YUI-Tab-refresh-Problem-tp26092010p26092010.html
      Sent from the ydn-javascript mailing list archive at Nabble.com.
    Your message has been successfully submitted and would be delivered to recipients shortly.