• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript called with some delay

 
Ganesan Ramakrishnan
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 466
1
IntelliJ IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post your JS funtion for us to help.
 
Rob Crowther
author
Ranch Hand
Posts: 297
5
Android Fedora Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need DOMContentLoaded instead of load. Or you could use jQuery $(document).ready() which will take care of compatibility with older browsers.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64994
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic