I have a question since some plugins are relying on other plugins for
functionality.

My Question might have already been solved, but i don't see it in the
documentation.

I basically would like to create a js file that has all my commonly
used jQuery stuff in it, therefore, needing a way to import plugins
into the DOM before the "ready" event fires.

I am requesting a function, for example "importJS", will load the
javascript file into the head of the document, and force the ready
event to wait until these additional files are loaded.



Example JS file
/* INCLUDE JQUERY REQUIREMENTS FOR BASEINTERFACE.JS */
$importJS('/js/jQuery/plugins/calendar/jquery-calendar.js');
$importJS('/js/jQuery/plugins/validationAide/stringaide.js');
$importJS('/js/jQuery/plugins/validationAide/validationAide.js');

$(document).ready(function(){

/* DEFINE CALENDAR FIELDS */
        $(".fieldControlDate").calendar({autoPopUp: 'button',
buttonImageOnly: true, buttonImage: '/images/calendar_mini.gif',
buttonText: 'Calendar', dateFormat: 'MDY/'});

        /* DEFINE FORM VALIDATION */
        $("form").validationAideEnable(
                null,
                {showInlineMessages:true, showSummary:false,
inlineMessageCssClass:"fieldvaluerequired-message",
fieldErrorCssClass:"fieldvaluerequired"},
                function (fieldValue, fieldObj){
                        $
("#"+fieldObj.id).parents(".fieldcontainer").removeClass("fieldcontainerrequired");
                },
                function (fieldValue, fieldObj, success){
                        if (!success) {
                                $
("#"+fieldObj.id).parents(".fieldcontainer").addClass("fieldcontainerrequired");
                        }
                }
        );

});


thoughts????
thanks.......

Reply via email to