Jump to content


UI tabs doesn't work with dynamic php files


2 replies to this topic

#1 hosam

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 11 February 2012 - 08:36 AM

well I try with many way to include file within UI tabs, but the results always failed and if success doesn't load dynamic content correctly for example form with submit will fail inside tabs outside everything working correctly these are my test:
$mail = include("mail.php");
$request = include("request.php");
echo'<div id="tabs">
		    <ul dir="rtl">
				 <li><a href="#tabs-1">mail</a></li>
				 <li><a href="#tabs-2">requests</a></li>
				 <li><a href="#tabs-3">3</a></li>
				 <li><a href="#tabs-4">4</a></li>
				 <li><a href="#tabs-5">5</a></li>
				 <li><a href="#tabs-6">6</a></li>
				 <li><a href="#tabs-7">7</a></li>
				 <li style="float:left;"><a href="#tabs-8">profile</a></li></ul>
							 <div id="tabs-1">'.$mail.' 
						    </div>
							 <div id="tabs-2">'.$request.'
														 </div>
								 </div>'; 
here the content load outside the tabs even if I use include inside the correct div id related to tabs link.
the other way is to use links only like this:
echo'<div id="tabs">
		    <ul dir="rtl">
				 <li><a href="mail.php">mail</a></li>
				 <li><a href="request.php">requests</a></li>
				 <li><a href="#tabs-3">3</a></li>
				 <li><a href="#tabs-4">4</a></li>
				 <li><a href="#tabs-5">5</a></li>
				 <li><a href="#tabs-6">6</a></li>
				 <li><a href="#tabs-7">7</a></li>
				 <li style="float:left;"><a href="#tabs-8">profile</a></li> </ul>' ; 

here all contents load inside tabs but doesn't allow the mail or request php files to work correctly if there dynamic contents like forms or mail functions.
so I hope if someone could help me to include this two files inside tabs and make everything work or just tell me where is my missing part here or what I should do if I have to receive $_POST['']; related to my contents inside tabs.
if you need any more explanation or code related just ask and hope to provide everything you needed just I don't know easy way to handle this one.

#2 dlantz

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts
  • LocationOakland, MD

Posted 13 February 2012 - 08:25 AM

you have to return the include with the content itself.
In my free time between 2 and 4am.

#3 hosam

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 07 March 2012 - 04:43 PM

I've tried with content also and same problem happen, so when I test this code with the old version of UI 1.7 that working without the whole errors happen previously anyway when I've tried to use sub tabs again face new problems so I've decided to not use tabs anymore and use menus with .load() at the <div> selector by id that is better faster and more able to make functions and php work inside without any problem thank you for your replay but I'll suggest anyone don't use these tabs you should work with better solutions around than use it.