Geeks With Blogs
Gaurav Taneja Great dreams... never even get out of the box. It takes an uncommon amount of guts to put your dreams on the line, to hold them up and say, "How good or how bad am I?" That's where courage comes in.

2         Javascipt code on the pop up page////////////////////     

Button1.Attributes.Add("onclick", "javascript:return closeBrowser(1);");

Button2.Attributes.Add("onclick", "javascript:return closeBrowser(2);");

function for closing the browser and taking the value in a hidden control

function closeBrowser(val)


// alert(window.opener.document.forms[0].ctl00_ContentPlaceHolder1_hidValue.value);

// window.opener.document.forms[0].ctl00_ContentPlaceHolder1_hidValue.value = val;

if (val == 1)


window.returnValue = true;


return true;




window.returnValue = false;


return false;



////////////////////////in ASPX PAGE on page load////////////////

btnSubmitAll.Attributes.Add("onclick", "var strReturn; strReturn=window.showModalDialog('modalDialog.aspx',null,'status:no;dialogWidth:370px;dialogHeight:220px;dialogHide:true;help:no;scroll:no'); if (strReturn != null) document.forms[0].ctl00$ContentPlaceHolder1$hidValue.value=strReturn;");

Posted on Thursday, April 3, 2008 8:07 PM Vini | Back to top

Comments on this post: Javascipt code on the pop up page

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Gaurav Taneja | Powered by: