window.showModalDialog problem from master page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shiyas
    New Member
    • Jan 2010
    • 1

    window.showModalDialog problem from master page

    I have an aspx page named PartSearch.aspx . This is in root directory. I want to popup this page using window.showModa lDialog from master page (by clicking a Hyperlink in master page) . So from master page
    i am using the following function using java script in hyperlink onClientClick
    event
    Code:
    var strURL = "PartSearch.aspx";  
                 var strReturn = window.showModalDialog(strURL,null,'status:yes;dialogWidth:550px; dialogHeight:500px;dialogHide:false;help:no;scroll:no;resizable:no;');    
                 return true;
    This is working fine from any content page in root directory. If i am clicking the same from any content page which is in a sub folder the url is changing to root\subfolder\ PartSearch.aspx " ( it is searching PartSearch.aspx in that subfolder ) . How to avoid this. I want to popup the 'PartSearch.asp x' from any content page which(content page) may be in subfolder.
    How to do this.
    Thanks
    Last edited by Dormilich; Jan 15 '10, 12:10 PM. Reason: Please use [code] tags when posting code
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Instead of using a relative URL to the aspx page, have you considered using an absolute URL?

    -Frinny

    Comment

    • firoz shaikh
      New Member
      • Sep 2010
      • 1

      #3
      Hi, I am also facing same problem can u please help me if your problem is resolved

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Change this line:
        var strURL = "PartSearch.asp x";
        to be this
        var strURL = "/PartSearch.aspx ";

        Comment

        Working...