11549 sujets
Hello.
Je suppose que tu parles d'un jQuery Ui tabs?
Si c'est le cas, tu n'as pas d'autres choix que de faire un appel au .tabs dans ton callback d'ajax, après avoir inséré ton HTML dans le DOM.
Une autre solution (plus sale, mais préférable selon les cas) est de placer un petit script inline dans le HTML chargé via ajax pour initialiser le tabs.
Je suppose que tu parles d'un jQuery Ui tabs?
Si c'est le cas, tu n'as pas d'autres choix que de faire un appel au .tabs dans ton callback d'ajax, après avoir inséré ton HTML dans le DOM.
Une autre solution (plus sale, mais préférable selon les cas) est de placer un petit script inline dans le HTML chargé via ajax pour initialiser le tabs.
$this->layout='ajax';
//header('content-type: application/json');
$h = getallheaders();
$o = new stdClass();
$source = file_get_contents('php://input');
$this->loadModel('SERVERS_TAGS');
$this->SERVERS_TAGS->table = 'servers_tags';
$conditions = 'servers_tags.server_id in ('.$source.')';
$join = array('tags'=>'servers_tags.tag_id = tags.tag_id',
'scripts_tags'=>'tags.tag_id = scripts_tags.script_id',
'scripts'=>'scripts_tags.script_id = scripts.script_id');
$group = '';
$order = '';
$rApplicationServers = $this->SERVERS_TAGS->find(array(
'fields' => 'scripts.script_id,scripts.script_name',
'conditions' => $conditions,
'join' => $join,
'order' => $order));
//debug($rApplicationServers);
echo ('<ul>
<li><a href="#applicationSelector-3">Runner</a></li>
</ul>
<div id="applicationSelector-3">
</div>
');
Voilà le code dans xxxxx.php
//header('content-type: application/json');
$h = getallheaders();
$o = new stdClass();
$source = file_get_contents('php://input');
$this->loadModel('SERVERS_TAGS');
$this->SERVERS_TAGS->table = 'servers_tags';
$conditions = 'servers_tags.server_id in ('.$source.')';
$join = array('tags'=>'servers_tags.tag_id = tags.tag_id',
'scripts_tags'=>'tags.tag_id = scripts_tags.script_id',
'scripts'=>'scripts_tags.script_id = scripts.script_id');
$group = '';
$order = '';
$rApplicationServers = $this->SERVERS_TAGS->find(array(
'fields' => 'scripts.script_id,scripts.script_name',
'conditions' => $conditions,
'join' => $join,
'order' => $order));
//debug($rApplicationServers);
echo ('<ul>
<li><a href="#applicationSelector-3">Runner</a></li>
</ul>
<div id="applicationSelector-3">
</div>
');
Voilà le code dans xxxxx.php