c# - Passing data from thickbox popup to parent through querystring -
calling thickbox popup parent page serviceticket.aspx :
function opencustomerview(companyid, accountid) { var e = document.getelementbyid('<%= txtaccountid.clientid %>'); var custid = e.value; **var url = "customersearch.aspx?custid=" + custid + "&tb_iframe=true&width=1200&height=800";** **tb_show("customer search", url);** } and on child popup window customersearch.aspx m using code close popup , sending values parent :
function closedialog(tanksize,companyid, accountid, address, servicecontract, cod, divisionid) { **var url = 'serviceticket.aspx?companyid=' + companyid + '&accountid=' + accountid + '&address=' + address.replace('#', '%23') + '&tanksize=' + tanksize + '&divisionid=' + divisionid;** } in above line var url='serviceticket.aspx?companyid=' how m passing values parent window.
handling values on parent page c# code behind
if (request.querystring["companyid"] != null && request.querystring["companyid"] != "") { short companyid = convert.toint16(request.querystring["companyid"]); } so need in closing child popup function closedialog , passing values parent var url used in closedialog function.please guide me or share code...
not sure if work or not way long did similar issue. give try , see if works out else notify here update again.
function closedialog(tanksize,companyid, accountid, address, servicecontract, cod, divisionid) { tb_remove(); var url = 'serviceticket.aspx?companyid=' + companyid + '&accountid=' + accountid + '&address=' + address.replace('#', '%23') + '&tanksize=' + tanksize + '&divisionid=' + divisionid; window.parent.location.href = url; }
Comments
Post a Comment