javascript - php page tabs not loading using AJAX -
i using tabs class got codecanyon... have couple of tabs want show, information php files(not large or resource consuming)...
i use code below load pages. , on initial load first page load.(it has access db etc when loading) , can browse second page(which @ point html). want go php page, keeps loading , loading...
i cannot use or post method in library using method pass variable , post discards away method value...
is there way see why page not load when php code comes in?
i did notice showing when check console in chrome(it apears once page loads:
http://website/includes/tabs/inc/getcontent.php?filename=%2fuser_management%2fuser_profile.php&password=apphptabs failed load resource: server responded status of 500 (internal server error)`
but not 100% sure of cause it. because loads perfectly...
## *** include tabs class define ("tabs_dir", "includes/tabs/"); require_once(tabs_dir."tabs.class.php"); ## *** create tabs object $tabs = new tabs(); ## *** set form submission type: "get", "post" or "ajax" $tabs->setsubmissiontype("ajax"); ## *** set css style $tabs->setstyle("grey"); ## *** set tabs caption //$tabs->setcaption("apphp tabs v".$tabs->version()); ## *** show debug info - false|true $tabs->debug(false); ## *** set mode of displaying child tabs $tabs->setchildtabstype("dropdown"); ## *** allow refreshing selected tabs $tabs->allowrefreshselectedtabs(false); ## *** add tabs ## example 1: $tabs->addtab("title"); ## example 2: $tabs->addtab("title", "text.txt"); ## example 3: $tabs->addtab("title", "text.txt", "icon.gif");#1"); $user_profile=$tabs->addtab("personal information", "user_management/user_profile.php"); $permissions=$tabs->addtab("permissions", "user_management/permissions.php"); ## *** set container's width $tabs->setwidth("690px"); $tabs->setheight("300px"); //$tabs->setwidth("100%"); //$tabs->setwidth("auto"); ## *** choose default tab $tabs->setdefaulttab($user_profile); ## *** display tabs $tabs->display();
i have found solution
it apears when loading php file in ajax relative path used not work.
i changed include('../../functions.php');
require_once(__dir__.'../../functions.php');
, issue resolved itself.
Comments
Post a Comment