Advertisement

06.25.2008 at 05:22AM PDT, ID: 23514129 | Points: 125
[x]
Attachment Details

Close the Current window while transfer from one page to another page

Asked by autopartsasia in JavaScript, Programming for ASP.NET, .NET Framework 2.0

Tags: Microsoft, Visual studio, 2005

Hi Experts,
I am using gridview with template field for diaplay data. In the template field there is a link button for edit the quantity. While clicking link button i am calling a javascript for open a new window. Meanwhile i need to close current web page while it transfers.. Though i am using window.self.close() in function, it dosen't works for me.. My script function is given below

function editQuantity(order_id)
{
    var scrWidth = screen.width;
    var scrHeight = screen.height;

    var winWidth = 500;
    var winHeight = 175;
      
    var winLeft = (scrWidth - winWidth)/2;
    var winTop = (scrHeight - winHeight)/2;
      
    var strFeatures = "toolbar=0,location=0,width=" + winWidth + ", height=" + winHeight + ", top=" + winTop + ", left=" + winLeft + ", status=0, scrollbars=0";
    //alert('../AddPartNumbertoCart.aspx?Partno='+partno+'&Description='+desc);
    window.self.close();
    window.open('../ShoppingCart/EditCartQuantity.aspx?order_id='+order_id, 'EditQuantity', strFeatures);
    return false;
}      

Any help would be appreciated.
Thanks in advance.
Regards,
RaviStart Free Trial
 
Keywords: Close the Current window while transf…
 
Loading Advertisement...
 
[+][-]06.25.2008 at 07:09AM PDT, ID: 21865739

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628