Search code examples
javascriptasp.net.netsafariipod

Running asp.net application in safari browser on ipod


I am testing my asp.net application in safari browser on ipod.I am having some problems with opening the pop up windows.I have a gridview in which some link buttons are there.On clicking these link buttons pop up window should open.But nothing is happening.Any solutions for this problem?

function OpenQuestionWindow(Store, AuditDate, SectionId) {
        var returnValue = window.showModalDialog("Questions.aspx?store=" + Store + "&auditDate=" + AuditDate + "&section=" + SectionId, "", "dialogHeight:750px; dialogWidth:950px;center:yes;edge:raised; Scroll:Yes; ");

        if (returnValue == true) {
            __doPostBack('', '');
        }
    }

Solution

  • window.showmodaldialog is not a function supported by Apple Safari. See the Safari Web Content Guide for iPhone OS. In the best case scenario, mobile browsers would treat that call as a pop-up, which are generally blocked by default. You should look at a javascript UI framework, JQuery UI comes to mind, to find a cross-platform compatible way to do what you are wanting.