How to replace the "document.URL.parseQuery()"

Sai18
Tera Expert

I have to replace "document.URL.parseQuery()" due to DOM manipulation issue from the below script, Please suggest

function onLoad() {
   //Type appropriate comment here, and begin script below
   
    var av = getParmVal('sys_u_assignment_verified');
    var val=g_form.getValue('u_assignment_verified');
//  alert(val);
   if(av=='date' && (val==null || val=='')){
       var ga = new GlideAjax('needdate');
         ga.addParam("sysparm_name", "ndate");
         ga.getXML(function getResponse(response) {
             var s = response.responseXML.documentElement.getAttribute('answer').toString();
                         g_form.setValue('u_assignment_verified',s);
                         alert("Your asset assignment was successfully verified \n \n Note: Please update the Work Notes field and click the Update button to commit your Assignment Verification Process");      
   });
       
       
   }
}

function getParmVal(name){
    var url = document.URL.parseQuery();
    if(url[name]){
        return decodeURI(url[name]);
    }
    else{
        return;
    }

   
}
0 REPLIES 0