469,343 Members | 5,620 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,343 developers. It's quick & easy.

window.showModalDialog problem from master page

1
I have an aspx page named PartSearch.aspx. This is in root directory. I want to popup this page using window.showModalDialog 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
Expand|Select|Wrap|Line Numbers
  1. var strURL = "PartSearch.aspx";  
  2.              var strReturn = window.showModalDialog(strURL,null,'status:yes;dialogWidth:550px; dialogHeight:500px;dialogHide:false;help:no;scroll:no;resizable:no;');    
  3.              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.aspx' from any content page which(content page) may be in subfolder.
How to do this.
Thanks
Jan 15 '10 #1
3 3756
Frinavale
9,735 Expert Mod 8TB
Instead of using a relative URL to the aspx page, have you considered using an absolute URL?

-Frinny
Jan 15 '10 #2
Hi, I am also facing same problem can u please help me if your problem is resolved
Sep 15 '10 #3
Plater
7,872 Expert 4TB
Change this line:
var strURL = "PartSearch.aspx";
to be this
var strURL = "/PartSearch.aspx";
Sep 15 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Diego F. | last post: by
reply views Thread by hazz | last post: by
1 post views Thread by Axford | last post: by
5 posts views Thread by Tarun Mistry | last post: by
1 post views Thread by Ganesh | last post: by
8 posts views Thread by Jonathan Wood | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.