Highlighted

how to pass value from cfgrid multiple select

New Here ,
Mar 27, 2015

Copy link to clipboard

Copied

Could anyone help?

Javascript fixMe() work properly in IE but not work in Chrome.

Sample script

<SCRIPT language="JavaScript">

<!--

function showErrorMessage(form, ctrl, value, message){

  alert("The value " + value + " of the " + ctrl + " field " + message);

}

function initGrid() {

ColdFusion.Grid.getGridObject('printpayment_grid').getSelectionModel().singleSelect = false;

}

function fixMe() {

  obj = ColdFusion.Grid.getSelectedRows('printpayment_grid');

   var selected1 = "";

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

        if(selected1 == "") selected1 = obj.C_VENDOR_NAME_PR;

        else selected1 += "," + obj.C_VENDOR_NAME_PR;

    }

    document.getElementById('selected1').value = selected1;

    return true;

\\-->

</SCRIPT>

Views

124

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

how to pass value from cfgrid multiple select

New Here ,
Mar 27, 2015

Copy link to clipboard

Copied

Could anyone help?

Javascript fixMe() work properly in IE but not work in Chrome.

Sample script

<SCRIPT language="JavaScript">

<!--

function showErrorMessage(form, ctrl, value, message){

  alert("The value " + value + " of the " + ctrl + " field " + message);

}

function initGrid() {

ColdFusion.Grid.getGridObject('printpayment_grid').getSelectionModel().singleSelect = false;

}

function fixMe() {

  obj = ColdFusion.Grid.getSelectedRows('printpayment_grid');

   var selected1 = "";

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

        if(selected1 == "") selected1 = obj.C_VENDOR_NAME_PR;

        else selected1 += "," + obj.C_VENDOR_NAME_PR;

    }

    document.getElementById('selected1').value = selected1;

    return true;

\\-->

</SCRIPT>

Views

125

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 27, 2015 0

Have something to add?

Join the conversation