How do I write javascript that is applicable to only one screen?

When you add a custom JavaScript for your widget the script gets loaded on all views of the widget but sometimes, you want the code that is applicable to only certain pages of the widget or only if certain field is shown, then you should make call to your functionality using YAHOO.util.Event.onContentReady functionality. You can read more about YAHOO.util.Event.onContentReady at http://developer.yahoo.com/yui/docs/YAHOO.util.Event.html

Looking for a Referral or a Loyalty Program?
NextBee has robust and feature rich platform
We guarantee your ROI
No long term contract to sign
Hassle free zero cost IT setup

Related Topics