-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: SwapnilDeshmukh
Message 3 in Discussion

Hi,
First in the parent window call a javascript function to open a popup window 
say

function OpenChildwindow()
{
        var retval="";
        
retval=window.showModalDialog('Userform.aspx','','dialogWidth:400px;dialogHeight:175px;
        status:no;dialogHide:true;help:no;scroll:no');


        if(retval != "" && retval != null)
        {
                window.execScript(("__doPostBack('UpdateUser', '" + retval + 
"')","JavaScript");
        }
}

This opened a modal window and waited for a return value.

I�m calling the __doPostBack() javascript function.
This function will appear in your JS code only when you use certain web 
controls, like the LinkButton.

function __doPostBack(eventTarget, eventArgument)



In the Child window
//This function accepts any value of the child form which has to be pass 
when calling the function
function ClosePopUp(returnVal)
{
        //SET RETURN VALUE OF THE DIALOG BOX OR DIALOG RESULT
        window.returnValue=document.getElementById(returnVal).value;

        //CLOSE DIALOG WINDOW
        window.close();
}

Then in my parent window in the Page_Load() function I did this:

        If ( Not Page.IsPostBack )
        {
                        BindGrid()
        }
        Else
        {
                    If ( Request.Form("__EVENTTARGET") = "UpdateUser" )
                {
                        UpdateItemQuantity(Request.Form("__EVENTARGUMENT"))
                }
        }

With Request.Form() I could get the values I passed to the javascript 
__doPostBack() function and use them in a condition and send them directly 
to a asp.net function.

_________________________________________________________________
Marriage?  http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Join 
BharatMatrimony.com for free.



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to