Current time: 12-16-2017, 03:17 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Facebook's "like" button
06-29-2010, 06:12 AM
Post: #11
RE: Facebook's "like" button
I disagree with you about the window.onload comment.

Every great webmaster should know what is under the hood of their website.

If there is an external script that has to use window.onload they should use some sort of addLoadEvent function like the one I have above.

The only scripts I do not know exactly what is under the hood are the prototype.js and protoaculous.js files.

I plan on digging in those eventually and finding exactly which functions I need to run my website.
Find all posts by this user
Quote this message in a reply
06-29-2010, 06:25 AM
Post: #12
RE: Facebook's "like" button
(06-29-2010 06:12 AM)green-watch.org Wrote:  Every great webmaster should know what is under the hood of their website.

If there is an external script that has to use window.onload they should use some sort of addLoadEvent function like the one I have above.

The reason I prefer the http://gist.github.com/412004 method is because I am making a webservice to be used on other sites as a javascript functions. I don't want to use the window.onload (even with addLoadEvent ) cause most webmasters are not a "great webmaster". They may have other shit on their page messing with window.onload . Moreover, some ad network may also cause problems (not the case for me cause on my site ads run in iframes).

Adding a dependency for jquery or prototype is overkill for the simple task I wanna acheive.

That said addLoadEvent is the best method to use if the website contains limited 3rd party scripts and the webmaster is skilled in javascript.

cdnplanet.com: We help you select the right CDN
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)