jQuery Dialog im IE anscheinend nicht vorhanden aber wieso?

BlubBlub

Mitglied
BookmarkletCode
HTML:
javascript:
(
	function()
	{
		if(typeof(window.minBook) == 'undefined')
		{
			var x = document.createElement('SCRIPT');
			x.type='text/javascript';
			x.src='../minBookmarklet.js';
			document.getElementsByTagName('head')[0].appendChild(x);
		}
		else
		{
	
			alert('close the open minBookmarklet');
		}
	}
)();


Nachgeladener Code minBookmarklet.js
HTML:
//"class" minBook
function minBook()
{
	minBook.init = init;
	minBook.bootstrapJQuery = bootstrapJQuery;
	minBook.jQueryLoadTest = jQueryLoadTest;
	minBook.bootstrapJQueryUI = bootstrapJQueryUI;
	minBook.jQueryUILoadTest = jQueryUILoadTest;
	minBook.createUI = createUI;
}


/*--------------------------------------------------------------------------------------------------------------	
	Function: init()
---------------------------------------------------------------------------------------------------------------*/
function init()
{
	minBook.bootstrapJQuery();
}


/*--------------------------------------------------------------------------------------------------------------	
	Function: bootstrapJQuery()			
---------------------------------------------------------------------------------------------------------------*/
function bootstrapJQuery()
{	
	if( (typeof(jQuery) == 'undefined')|| (jQuery.fn.jquery != '1.5.1') ) 
	{	
		//jQuery javascript
		var jQueryScript = document.createElement("script");
		jQueryScript.type = "text/javascript";
		jQueryScript.src= "../jquery-1.5.1.min.js";
		document.getElementsByTagName("head")[0].appendChild(jQueryScript);
	} 
		
	minBook.jQueryLoadTest();
}


/*--------------------------------------------------------------------------------------------------------------	
	Function: jQueryLoadTest()			
---------------------------------------------------------------------------------------------------------------*/
function jQueryLoadTest()
{
    if(typeof(jQuery) == 'undefined')
        window.setTimeout(minBook.jQueryLoadTest,100);
    else minBook.bootstrapJQueryUI();
}


/*--------------------------------------------------------------------------------------------------------------	
	Function: bootstrapJQueryUI()			
---------------------------------------------------------------------------------------------------------------*/
function bootstrapJQueryUI()
{	
	//jQuery UI javascript	  
	var jQueryUIScript = document.createElement("script");
    jQueryUIScript.type = "text/javascript";
	jQueryUIScript.src= "../jquery-ui-1.8.10.custom.min.js";
	document.getElementsByTagName("head")[0].appendChild(jQueryUIScript);
	 
	//jQuery-ui stylesheet
	var jQueryUICSSLink = document.createElement("link");
	jQueryUICSSLink.type = "text/css";
	jQueryUICSSLink.rel = "stylesheet";
	jQueryUICSSLink.href = "../jquery-ui-1.8.10.custom.css";
	document.getElementsByTagName("head")[0].appendChild(jQueryUICSSLink);

	minBook.jQueryUILoadTest();
}


/*--------------------------------------------------------------------------------------------------------------	
	Function: jQueryLoadTest()			
---------------------------------------------------------------------------------------------------------------*/
function jQueryUILoadTest()
{
    if(typeof(jQuery.ui) == 'undefined')
        window.setTimeout(minBook.jQueryUILoadTest,100);
    else minBook.createUI();
	
}


/*--------------------------------------------------------------------------------------------------------------	
	Function: createUI()		
---------------------------------------------------------------------------------------------------------------*/
function createUI()
{
	alert("jQuery.ui: " + jQuery.ui);
	alert("jQuery.ui.version: " + jQuery.ui.version);
	alert("jQuery.fn.jquery: " + jQuery.fn.jquery);
	
	jQuery('body').append('<div id="Mydiv"></div>');
	
	jQuery(document).ready(function(){			
		jQuery('#Mydiv').dialog({
			title: 'My Dialog',
			position: [10,10],
			resizable: false,
			width: 515,
			close: function() 
				   {
						window.location.reload();
				   }
		});
	});
}

/*********************************************************************************************************************************************
 *												 Invoke						 															     *
 *********************************************************************************************************************************************/
new minBook();						
minBook.init();


Hi ich hab obigen Code geschrieben und auf dem IE 8 und Firefox getestet.
Auf dem Firefox funktioniert er gut.
Auf dem IE funktioniert er auch gut AUßER auf der website http://www.chip.de
Dort bekomme ich als Fehlermeldung: "Das Objekt unterstützt diese Eigenschaft oder Methode nicht". Verwiesen wird hierbei auf den Code, der sich ganz unten in meinem zweiten aufgeführten Code befindet
HTML:
jQuery('#Mydiv').dialog({

Woran liegt es und wie krieg ich die Fehlermeldung behoben?
 
Zuletzt bearbeitet:

Neue Beiträge

Zurück