473,554 Members | 2,299 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

window.showModa lDialog problem from master page

1 New Member
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
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.asp x' from any content page which(content page) may be in subfolder.
How to do this.
Thanks
Jan 15 '10 #1
3 3938
Frinavale
9,735 Recognized Expert Moderator Expert
Instead of using a relative URL to the aspx page, have you considered using an absolute URL?

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

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

Similar topics

3
4433
by: Diego F. | last post by:
Hello. I'm trying to call a function that prints the content of a div element. I had that javascript code working, but now I must put that code in the server side, as it is called from another component. The problem is that it can't find the div control. Don't know why. I paste the code here: That's in the aspx.vb file: ...
0
2677
by: hazz | last post by:
A treeview control should be able to select various aspx pages in the site. (using sitemap) One content page will have a gridview, accessed through a content place holder while another aspx page will contain a report viewer, accessed through the same contentplaceholder. At least that is how I understand it. If I want the master page to...
1
2226
by: Axford | last post by:
Hello, when I use the IE javascript 'showModalDialog' function to display a calendar I encouter the following problem: My aspx page uses a master page (asp.net 2.0). My 'showModalDialog' opens a page without master page, but this gives an error message, because it appears that the 'showModalDialog' assumes that the same master page as the...
2
1408
by: msc | last post by:
I have a master page with a dropdown list on it. When someone changes the selection I would like to run a sub on the content page to reflect the change. I have found ways to clear controls on the content pages but no way to run code attached to the content page from an event on the master page. Is this possible?
5
1636
by: Tarun Mistry | last post by:
Hi all, I have created an object within my Master Page. I would like to use this object in my content pages. What would I need todo to achieve this? Alternatively, what is the best way of handling a global object (in this case, a shopping cart object). Kind regards Taz
1
1339
by: Luqman | last post by:
I have setup a Menu using Master Page, and I want to retrieve the name of the selected Menu. I tried using following code in Page.Master, Protected Sub MainMenu_MenuItemClick Event Session("MyMenu")=mainmenu.SelectedItem.Text End Sub
1
1732
by: Ganesh | last post by:
How to call javascript in a asp.net master's content page, i tried something like this but it's not working. <%@ Page Language="C#" MasterPageFile="~/Default.master" AutoEventWireup="true" CodeBehind="RegisterUser.aspx.cs" Inherits="MySpace.RegisterUser" %> <asp:content id="Content1" contentplaceholderid="Main" runat="server">
8
1887
by: Jonathan Wood | last post by:
I want to dynamically set my site's theme based on a setting stored in my database. I just hooked this up but get an error that the theme can only be set in the page's PreInit event or earlier. However, it appears that Master pages do not have PreInit events. I REALLY do not want to have to stick the same code in each and every page I...
5
3855
by: Murray | last post by:
Forgive me if this question is too basic, but I'm new to ASP.NET programming, and I can't locate a simple answer to this question. I have a web page that consists of a Master Page and a single contentplaceholder. The master page has a menu bar in it. How do I change the web page that is displayed in the contentplaceholder when I click on a...
0
7536
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7814
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7576
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5443
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5165
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3583
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2027
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1147
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
853
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.