i did not change anything but now it works!
Could it be that crome has problems in loading the js files?
What happens if the Prototype.js file is not finished with loading and
this code is starting?
Greetz
On 19 Sep., 18:40, Posseidon <[EMAIL PROTECTED]> wrote:
> 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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---