Skip to main content

Search and Top Navigation

#3085 closed bug (notabug)

Opened July 10, 2008 04:31PM UTC

Closed July 16, 2008 08:34AM UTC

ui.tabs doesnt support json

Reported by: kaniartur@gmail.com Owned by: klaus.hartl
Priority: major Milestone:
Component: ui.tabs Version: 1.5.1
Keywords: ui.tabs json Cc:
Blocked by: Blocking:
Description

when i try do get JSON response for tabs reload i get error : "Node cannot be inserted at the specified point in the

hierarchy",

my code :

$(document).ready(function(){
		$("#example > ul").tabs();
		$("#example > ul").tabs("url",1, 'handle.php');
		$("#example > ul").tabs( { ajaxOptions: {		success : function (data,s)alert(data);},		

					cache: false,							dataType : "json"}
		});
	});

server side code :

<?php
echo "{ test : 123 }";
?>

html : i have 2 tabs, 1 loads static html and second load data from server ( $("#example > ul").tabs("url",1, 'handle.php'); ),

what ive discovered - i cannot overwrite function that is called onsuccess ( "ajaxOptions : { succes : function ()... " ) . I

looked in the source code of ui.tabs and i found this :

var ajaxOptions = $.extend({}, o.ajaxOptions, {
			url: url,
			success: function(r, s) {				
				
				$(a.hash).html(r);
...........

so is this error is caused becouse on success ui.tabs tries to append to page json data? and why i cant overwrite onsuccess

method?. mayby im doing something wrong?

Attachments (0)
Change History (1)

Changed July 16, 2008 08:34AM UTC by scottgonzalez comment:1

resolution: → invalid
status: newclosed

We can't allow overriding the success function because we need to use that to perform critical functionality for tabs to work. The page you request for remote tabs is supposed to return the exact HTML you want to insert into the tab's panel.