如何在jquery中调用popup [英] How can I call popup in jquery

查看:78
本文介绍了如何在jquery中调用popup的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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');
     }





第一次添加按钮我能够获得弹出窗口但是在第二次添加我得到弹出窗口但它是开了。如何调用第二个弹出窗口?



first time on add button i am able to get the popup but on 2nd add i get popup but it is getting opened. How can i call 2nd popup?

推荐答案

#PRODUCT_NAME_POP)。attr( href,url)
("#PRODUCT_NAME_POP").attr("href", url)


#PRODUCT_NAME_POP)。colorbox({iframe: true ,width: 80%,身高:< span class =code-string> 80%});
}

// 我在下面的函数中调用上面的弹出窗口:
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'cize ='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');
}
("#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'); }





第一次添加按钮我能够获得弹出窗口但是在第二次添加我得到弹出窗口但它是开了。我如何调用第二个弹出窗口?



first time on add button i am able to get the popup but on 2nd add i get popup but it is getting opened. How can i call 2nd popup?


这篇关于如何在jquery中调用popup的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆