function PRODUCT_NAME_POP_onclick(obj) { popuptype = "popuptype=product_pop&" t_form_name = "Form_name=Sales_Update_form&" var cnt = SalesUpdateTabRequest.rows.length - 1; temp1 = cnt - 1; var temp = obj.parentNode.parentNode.parentNode.rows.length - 1; t_id = obj.parentNode.parentNode.rowIndex - 1; alert('temp: ' + temp); if (t_id == 0) { a_ret_val = "a_ret_val=SI_PRODUCT_MASTER_ID,PRODUCT_NAME&" var url = "Popups/SO_GenericPopup.aspx?" + popuptype + t_form_name + a_ret_val; } else { alert('TID :' + t_id); a_ret_val = "a_ret_val=SI_PRODUCT_MASTER_ID[" + t_id + "],PRODUCT_NAME[" + t_id + "]&" var url = "Popups/SO_GenericPopup.aspx?" + popuptype + t_form_name + a_ret_val; } $("#PRODUCT_NAME_POP").attr("href", url) $("#PRODUCT_NAME_POP").colorbox({ iframe: true, width: "80%", height: "80%" }); } //I call the above popup in below function : function AddOnClick(t_setfocus) { var arrCellContent = new Array(); var tabElem = document.getElementById('SalesUpdateTabRequest'); arrCellContent[0] = "<input type='Checkbox' id='chk_deleteinst' name='chk_deleteinst'>"; arrCellContent[1] = "<INPUT type='text' name='PRODUCT_NAME' type='text' cssclass='inpTxt' size='10' id='PRODUCT_NAME' readOnly='true'>"; arrCellContent[1] = arrCellContent[1] + "<INPUT class='arrow' onclick='return PRODUCT_NAME_POP_onclick(this)' type='button' value='...' name='PRODUCT_NAME_POP' id='PRODUCT_NAME_POP'>"; arrCellContent[1] = arrCellContent[1] + "<input type='hidden' id='SI_PRODUCT_MASTER_ID' name='SI_PRODUCT_MASTER_ID'>"; addNewRowAtEnd(arrCellContent, 'SalesUpdateTabRequest'); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)