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: 87
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: 459
    
    1
Please post your JS funtion for us to help.


Vinod Tiwari | Twitter
Rob Crowther
author
Ranch Hand

Joined: Nov 06, 2012
Posts: 268
    
    4

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: 60053
    
  65

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
 
Similar Threads
Embedded JSP component in JavaScript pop up page.
Session.invalidate() and Logout
window.opener performance error
Child windows not getting closed
Closing child window after executing Action