Adsense

Javascript code to retrive the dojo form data

function getElements (widget){
    var tempf= widget.formFields;
    var ids = {};
    for (var data in tempf){
        var obj = widget.formFields[data];
        ids[data]=obj.fieldWidget.id;
    }
    return ids;
}

function getWidget (form , widgetId){
    var formSection = form.sections;
    if (formSection!=null){
        for (var data in formSection ){
            if (widgetId==formSection[data].sectionId){
                return getElements(formSection[data]);
            }
        }
        for (var data in formSection){
            return getWidget(formSection[data],widgetId);
        }
        }else{
    return ;}
 
}

function getElementIds( formId , widgetId){
    var form = dijit.registry.byId(formId) ;
    var elementId = getWidget(form,widgetId);
    return elementId;
}

function data () {
    var data = getElementIds("formid1","widgetid1");
alert(data);}
return data();

3 comments:

comment here

newest questions on wordpress