471,887 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,887 software developers and data experts.

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 3817
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
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.