CA SDM - BREL - window - retrieving information

Document created by TMACUL Champion on Oct 9, 2015
Version 1Show Document
  • View in full screen mode

function loadActions()

{

  //alert("oi");

  var setinp=window.document.main_form.elements["ref_num"];

  //persid do ztrabalho - gerado novo ID quando New

    var vpersid = "$args.persistent_id";

  ///toda URL

  var vdocloc = document.location;

  //caminho das pastas ex: /CAiSD

  var vpathname = window.location.pathname;

  //Caminho inteiro

  var vhref = window.location.href;

 

 

// var vpersid2 = "$args.call_req_id";

  //var vpersid3 = "$args.Persid";

  //var idx1 = relUrl.indexOf("PERSID=");

  alert("vdocloc= " + vdocloc);

 

 

var params = {};

 

 

if (location.search) {

    var parts = location.search.substring(1).split('+');

 

 

    for (var i = 0; i < parts.length; i++) {

        var nv = parts[i].split('=');

        if (!nv[0]) continue;

        params[nv[0]] = nv[1] || true;

    }

}

 

 

alert("===.params.ref_num=" + params.ref_num)

// var setinp=window.document.main_form.elements["ref_num"];

oFormObject = document.forms[0];

 

 

var numOfElements = document.forms[0].elements.length;

         alert("The number of elements in this document are:" + numOfElements);

var i = 0;

for (i = 0; i < numOfElements; i++) {

  alert("Element n[" + i + "] = " + document.forms[0].elements[i].id + "#"  +" ==> " + document.forms[0].elements[i].value);

}

//oFormObject.elements["call_req_id"].value = params.ref_num;

 

 

oFormObject.elements["df_0_0"].value =  params.ref_num;

 

 

alert("2params.ref_num=" + oFormObject.elements["df_0_0"].value);

}

Attachments

    Outcomes