Posseidon
unread,Sep 19, 2008, 12:40:38 PM9/19/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prototype & script.aculo.us
Hi guys!
i have made a little class to create textboxes!
here is the code:
var loadingWindow = Class.create();
loadingWindow.prototype = {
initialize: function()
{
this.disableDiv = new Element('div',
{ id:'disableDiv' });
this.disableDiv.insert( {top: new
Element('img', { id:'loadingGif', src:'pics/site/loading.gif',
style:'position:absolute; z-index:11; border:0px;' } ) });
this.disableDiv.addClassName('blankdiv');
},
createLoadingWindow: function( elementID )
{
var elHeight = $
( elementID ).getHeight();
if( !$('disableDiv') )
{
pageHuelle = $
( elementID ).insert( { top: this.disableDiv } );
$
('disableDiv').setStyle( { height:elHeight + 'px' } );
$
('disableDiv').down('img').setStyle( { top:elHeight*0.3 + 'px' } );
}
},
disableLoadingWindow: function()
{
if( $('disableDiv') ) $
('disableDiv').remove();
}
};
yes i know it is not pretty JS Code but it works fine in all browsers
except Chrome!
Chrome allways says the following error Message when starting my site:
Uncaught TypeError: Object [object HTMLDivElement] has no method
'insert' on line 12
its the line with this code: this.disableDiv.insert( {top: new
Element('img', { id:'loadingGif',..... and so on...
What is the problem on this? it seems that Chrome doesnot extend new
Elements!
How can i fix this?
Thank you
Greetz
Possal