Web Analytics Made Easy -
StatCounter Link Target for Ajax Tabs - CodingForum

Announcement

Collapse
No announcement yet.

Link Target for Ajax Tabs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Link Target for Ajax Tabs

    I have an ajax tabbed site which loads the content in the div below it.

    I made a drop down link so that the user could select one of 3 on one tab but this is outside of the script.js. I'm wondering if there's a way to get the target of these drop down links to open in the div below instead of a new tab?

    http://voiceprocess.net/script.js

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Home Improvement Survey Process</title>
    <link href="../../../voiceprocess.ico" rel="shortcut Icon">
    <link rel="stylesheet" type="text/css" href="../styles.css" />
    <link href="../dropdown.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.min.js"></script>
    <script type="text/javascript" src="script.js"></script>

    </head>

    <body>

    <div id="main" style="float:left">

    <table width="991" border="0" cellpadding="0">
    <tr>
    <td width="649"><ul class="tabContainer">
    <!-- The jQuery generated tabs go here -->
    </ul></td>
    <td width="75" style="padding-bottom:43px"> <div id="centeredmenu" style=" width:0px; height:0px"> <ul > <li style="padding-left:0px"><span class="sears"><a href="#')">&nbsp;</a></span>
    <ul style="padding-top:2px"> <span class="space"></span><span class="space"></span>
    <li><a href="pages/sears_refacing.html" target="_self">Cabinets Refacing</a> <div>
    <li><a href="pages/sears_hvac.html">HVAC </a></li>
    <li><a href="pages/sears_windows.html"></a>New Windows </a></li>
    </ul>
    </li>
    </div></td>
    <td width="241"><a href="upsell.php" target="_blank"><img src="../u.png" alt="" width="26" height="37" border="0" style="padding-bottom:5px"/></a>&nbsp;<a href="../data.html" target="_blank"><img src="../s.png" alt="" width="29" height="37" border="0" style="padding-bottom:5px"/></a><img src="../../../images/logosm.png" alt="" width="158" height="42" hspace="10" /> </td>
    </tr>
    </table>
    <div id="tabContent">
    <div id="contentHolder">
    <!-- The AJAX fetched content goes here -->
    </div>
    </div>
    </body>
    </html>
    Last edited by johnwboyd; Aug 31, 2011, 06:18 PM.
    Earn up to 10-30% per day growth in Binary Options Trading!

  • #2
    Not to ask a silly question...

    Why do people use AJAX to get *static* tab content??

    I can understand using AJAX if your tab content is partly from a database (i.e., if you are using PHP or ASP or JSP pages to get the content), but when the content is just an HTML file????

    Why not simply load up *all* the tabs when the page first loads and then simply switch one is showing? *SO* much simpler. And likely faster, in the long run. Certainly a lighter server load.
    Be yourself. No one else is as qualified.

    Comment


    • #3
      So you are saying you want these links:
      Code:
      <li><a href="pages/sears_refacing.html" rel="nofollow" target="_self">Cabinets Refacing</a> <div>
      <li><a href="pages/sears_hvac.html">HVAC </a></li>
      <li><a href="pages/sears_windows.html"></a>New Windows </a></li>
      to open in the *same* <div id="contentHolder"> as do the tabbed links?

      Incidentally, your HTML there is illegal.

      The <div> should be </li>.

      The red </a> is bogus and extra.
      Be yourself. No one else is as qualified.

      Comment


      • #4
        So you are saying you want these links:
        Code:

        <li><a href="pages/sears_refacing.html" rel="nofollow" target="_self">Cabinets Refacing</a> <div>
        <li><a href="pages/sears_hvac.html">HVAC </a></li>
        <li><a href="pages/sears_windows.html"></a>New Windows </a></li>

        to open in the *same* <div id="contentHolder"> as do the tabbed links?

        YES. Thank you!
        Earn up to 10-30% per day growth in Binary Options Trading!

        Comment


        • #5
          Originally posted by johnwboyd View Post
          So you are saying you want these links:
          Code:

          <li><a href="pages/sears_refacing.html" rel="nofollow" target="_self">Cabinets Refacing</a> <div>
          <li><a href="pages/sears_hvac.html">HVAC </a></li>
          <li><a href="pages/sears_windows.html"></a>New Windows </a></li>

          to open in the *same* <div id="contentHolder"> as do the tabbed links?
          YES. Thank you!


          This forum is not allowing me to thank or reply per poster it seems...

          P.S. there it is now and I can't delete this post. Dohh.
          Earn up to 10-30% per day growth in Binary Options Trading!

          Comment


          • #6
            Do you suggest a 2 frame layout?
            Earn up to 10-30% per day growth in Binary Options Trading!

            Comment


            • #7
              You mean an <iframe>? How does that get the content specified by your add-on menu into the *SAME* <div> as the AJAX tabs???

              I started to give this a try, but I don't use jQuery and I think I would have made it way overly complex. If you don't get an answer soon, ask in the jQuery forum.
              Be yourself. No one else is as qualified.

              Comment


              • #8
                Originally posted by Old Pedant View Post
                You mean an <iframe>? How does that get the content specified by your add-on menu into the *SAME* <div> as the AJAX tabs???

                I started to give this a try, but I don't use jQuery and I think I would have made it way overly complex. If you don't get an answer soon, ask in the jQuery forum.
                Yeah I guess ur right. I'm just going to redo in basic ajax tabs.
                Earn up to 10-30% per day growth in Binary Options Trading!

                Comment

                Working...
                X