MasterACE14 Posted December 5, 2009 Share Posted December 5, 2009 Hello, I'm using the jQuery library and in particular the AJAX part of it. It's all working fine except for one thing... I have 3 divs which are loaded through the use of AJAX, #left, #contentmain and #right. in #contentmain each PHP file it loads has... require_once("GETengine-1.0.0/index.php"); ...in it. I want to put that in the PHP file that is loaded in #right as well. However when I do that the website doubles. By doubling I mean you can see the whole website, and then the exact same website seems to overlap the original like the following... however its my 'exact' website doubled twice. It only happens when I add that require_once into the PHP file I load into #right. Here is rightpanel.php (the PHP file loaded into #right): <?php require_once("GETengine-1.0.0/index.php"); session_start(); // require_once("config.php"); // require_once("connect.inc.php"); // require_once("includes.php"); if(isset($_SESSION['userid'])) { $user = userDetails($_SESSION['userid']); $xpPerc = (($user['exp']/XP($user['level']))*100); echo "Level ".$user['level']; echo "<img src=\"images/exp.php?percent=".$perc."\" alt=\"".XP($user['level'])."%"."\" />"; echo "<div style=\"font-size: 8pt; overflow: visible;\">".number_format($user['exp'])." / ".number_format(XP($user['level']))." xp</div>"; echo "<div style=\"font-size: 8pt; overflow: visible; border-top: 1px solid #000;\">"; echo number_format($user['diamonds'])." diamonds<br />"; echo number_format($user['titanium'])." titanium"; echo "</div>"; echo "<div style=\"font-size: 8pt; overflow: visible; border-top: 1px solid #000;\">"; echo "</div>"; } ?> here is the AJAX call for rightpanel.php into the #right div: $.ajax({ type: "POST", url: 'rightpanel.php', async: true, success: function(html){$("#right").html(html);} }); If more code is required to determine the problem, please let me know. Cheers, Ace Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.