I am using a infragestic ultra web grid and in the code behind, I try to use
to open window to open an aspx file using window.open and it opens an empty
window.
protected void uwgSubjective_InitializeRow(object sender, RowEventArgs e)
{ if (e.Row.Band.Index == 0)
{
if (e.Row.Cells[0].Value != null)
{
e.Row.Cells.FromKey("Edit").TargetURL =
"javascript:void(window.open('AddORPPSubjective_popup?mode=edit&id=" +
e.Row.Cells[0].Value.ToString() +
"','','height=290,width=460,toolbar=no,location=0,directories=no,status=1,menubar=no,scrollbars=1,copyhistory=no,resizable=yes'));";
so the target url info will be
"javascript:void(window.open('AddORPPSubjective_popup?mode=edit&id=79','','height=290,width=460,toolbar=no,location=0,directories=no,status=1,menubar=no,scrollbars=1,copyhistory=no,resizable=yes'));"
and the opened window's code is empty:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
when I use the same code inside the asp file, it works fine.
Any ideas appreciated. thanks in advance and happy coding!
generated html is
<div class="rounded_content">
<div id="Div15" class="rcc_content">
<div class="table_content">
<input type='hidden'
id='uwgSubjective' name='uwgSubjective' value="" /><table border='0'
cellpadding='0' cellspacing='0' id='uwgSubjective_main'
style="overflow:hidden;table-layout:fixed;position:relative;width:100%;height:150px;"
class="ig_providerControl igtbl_providerControl ig_c746583f_r0"
onresize="igtbl_onResize('uwgSubjective');"
onmousemove="igtbl_tableMouseMove(event,'uwgSubjective');"
onmouseup="igtbl_tableMouseUp(event,'uwgSubjective');"><tr
id="uwgSubjective_mr" style="height:100%;"><td id="uwgSubjective_mc"
align='left' style="height:100%;width:100%;vertical-align:top;"><div
id="uwgSubjective_div"
style="position:relative;overflow:auto;width:100%;height:100%;"
onscroll='igtbl_onScroll(event,"uwgSubjective");' tabIndexPage='0'
hideFocus='true'><table id='G_uwgSubjective' bandNo='0' border='0'
cellpadding='0' cellspacing='0'
style='table-layout:auto;width:727px;position:relative;'
onSelectStart='igtbl_selectStart(event,"uwgSubjective");'
onmousedown='igtbl_cellClickDown(event,"uwgSubjective");'
onmouseup='igtbl_cellClickUp(event,"uwgSubjective");'
oncontextmenu='igtbl_cellContextMenu(event,"uwgSubjective");'
onmousemove='igtbl_cellMouseMove(event,"uwgSubjective");'
onmouseover='igtbl_cellMouseOver(event,"uwgSubjective");'
onmouseout='igtbl_cellMouseOut(event,"uwgSubjective");'
ondblclick='igtbl_cellDblClick(event,"uwgSubjective");'><colgroup><col
width='22px' /><col width='550px' /><col width='80px' /><col width='30px'
/><col width='45px' /><col width='1px' style='display:none;'
/></colgroup><thead class="ig_providerItem igtbl_providerItem
ig_providerHeader igtbl_providerHeader ig_c746583f_r4"
onmousedown='igtbl_headerClickDown(event,"uwgSubjective");'
onmouseup='igtbl_headerClickUp(event,"uwgSubjective");'
onmouseout='igtbl_headerMouseOut(event,"uwgSubjective");'
onmousemove='igtbl_headerMouseMove(event,"uwgSubjective");'
onmouseover='igtbl_headerMouseOver(event,"uwgSubjective");'
oncontextmenu='igtbl_headerContextMenu(event,"uwgSubjective");'><tr><th
height='5px'><img src='ig_styles/provider/images/ig_tblBlank.gif' border='0'
imgType='blank' style='visibility:hidden;' /></th><th
id='uwgSubjective_c_0_0' columnNo='0' height='5px' class="ig_providerHeader
igtbl_providerHeader ig_c746583f_r4"
style="display:none;"><nobr>orpp_subjective_id</nobr></th><th
id='uwgSubjective_c_0_1' columnNo='1' height='5px' class="ig_providerHeader
igtbl_providerHeader ig_c746583f_r4"><nobr>Note</nobr></th><th
id='uwgSubjective_c_0_2' columnNo='2' height='5px' class="ig_providerHeader
igtbl_providerHeader ig_c746583f_r4"><nobr>Date</nobr></th><th
id='uwgSubjective_c_0_3' columnNo='3' height='5px' class="ig_providerHeader
igtbl_providerHeader ig_c746583f_r4"><nobr>Edit</nobr></th><th
id='uwgSubjective_c_0_4' columnNo='4' height='5px' class="ig_providerHeader
igtbl_providerHeader
ig_c746583f_r4"><nobr>Delete</nobr></th></tr></thead><tbody
style="height:100%" class="ig_providerItem igtbl_providerItem
ig_providerHeader igtbl_providerHeader ig_c746583f_r4"><tr
id='uwgSubjective_r_0' style='height:5px;' DataKey='88' level='0'><th
id='uwgSubjective_l_0' class="igtbl_providerLabel"style="width:22px;
height:5px;"><img src='ig_styles/provider/images/ig_tblBlank.gif' border='0'
imgType='blank' style='visibility:hidden;' /></th><td style="display:none;"
level="0_0"><nobr>88</nobr></td><td level="0_1"><nobr>test1</nobr></td><td
level="0_2"><nobr>08/07/2009</nobr></td><td uV="Edit"
targetURL="javascript:void(window.open('AddORPPSubjective_popup?mode=edit&id=88','','height=290,width=460,toolbar=no,location=0,directories=no,status=1,menubar=no,scrollbars=1,copyhistory=no,resizable=yes'));"
level="0_3"><nobr><a
href="javascript:void(window.open('AddORPPSubjective_popup?mode=edit&id=88','','height=290,width=460,toolbar=no,location=0,directories=no,status=1,menubar=no,scrollbars=1,copyhistory=no,resizable=yes'));"
tabindex="-1">Edit</a></nobr></td><td uV="Delete"
targetURL="javascript:%20if(confirm('Are%20you%20sure%20you%20want%20to%20delete?'))%20{%20dotb('Delete%20Note','AddORPPSubjective_popup.aspx?mode=delete&id=88&TB_iframe=true&height=290&width=460');}"
level="0_4"><nobr><a
href="javascript:%20if(confirm('Are%20you%20sure%20you%20want%20to%20delete?'))%20{%20dotb('Delete%20Note','AddORPPSubjective_popup.aspx?mode=delete&id=88&TB_iframe=true&height=290&width=460');}"
tabindex="-1">Delete</a></nobr></td></tr></tbody></table></div></td></tr></table>
</div>
</div>
Andy