jQuery UI tabs go back to selected tab after ajax response
Hi i add here the only neccsesry code ,
My succses of my ajax response :
success:
function(result){
if(result=='correct'){
window.location='editu.php';
}
So like you see i return back to page called editu.php after all correct
from the php post, In my editu.php i have jqueryUI tabs with 2 tabs like
that :
<div id="tabs">
<ul>
<li style="float:right;font-weight:bold;"><a href="#tabs-1">edit
admins</a></li>
<li style="float:right;font-weight:bold;"><a href="#tabs-2">edit
users</a></li>
</ul>
<div id="tabs-1" >
<?php foreach()... the admins list ?>
</div>
<div id="tabs-2" >
<?php foreach()... the users list ?>
</div>
</div>
So any idea how to go back to the same tab i was before and not the
defualt tab which is tab-1 ? I tought somthing of change this :
window.location='editu.php';
To somthing else like :
window.location='editu.php#jquiry UI tab-1';
Any idea? thanks allot.
No comments:
Post a Comment