aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Javascript called with some delay Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript called with some delay" Watch "Javascript called with some delay" New topic
Author

Javascript called with some delay

Ganesan Ramakrishnan
Ranch Hand

Joined: Mar 18, 2008
Posts: 90
Hi,

I hava an issue in my javascript function which is called from body onload of the window.
actualy inside the javascirpt, i am diabling the button, which is in centre of the window.
after i am displaying some list of images.
my problem is , the button disabled only after load the all images in bottom of the screen
i want to disable the button before full screen loaded.

anybody help me to solve this issue?

Regards,
Ganesan
Vinod Tiwari
Ranch Hand

Joined: Feb 06, 2008
Posts: 466
    
    1

Please post your JS funtion for us to help.


Vinod Tiwari | Twitter | Shikshanirman | Guftgu
Rob Crowther
author
Ranch Hand

Joined: Nov 06, 2012
Posts: 297
    
    5

You need DOMContentLoaded instead of load. Or you could use jQuery $(document).ready() which will take care of compatibility with older browsers.


Read my books: Hello! HTML5 & CSS3 | HTML5 in Action | Read my blog
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61612
    
  67

If the button is to always be disabled upon load, why are you using JavaScript at all? Just mark the button as disabled in the markup.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript called with some delay