Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Feb 2008
    Posts
    54
    Thanks
    19
    Thanked 0 Times in 0 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; 08-31-2011 at 10:18 PM.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,133
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    johnwboyd (09-01-2011)

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,133
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    johnwboyd (09-01-2011)

  • #4
    New Coder
    Join Date
    Feb 2008
    Posts
    54
    Thanks
    19
    Thanked 0 Times in 0 Posts
    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!

  • #5
    New Coder
    Join Date
    Feb 2008
    Posts
    54
    Thanks
    19
    Thanked 0 Times in 0 Posts
    Quote 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.

  • #6
    New Coder
    Join Date
    Feb 2008
    Posts
    54
    Thanks
    19
    Thanked 0 Times in 0 Posts
    Do you suggest a 2 frame layout?

  • #7
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,133
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    johnwboyd (09-02-2011)

  • #8
    New Coder
    Join Date
    Feb 2008
    Posts
    54
    Thanks
    19
    Thanked 0 Times in 0 Posts
    Quote 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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •