473,797 Members | 2,893 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question about window.open

Hi,

I have a webform that will pop up window by clicking button or links
inside data grid.
Here are some sample code snippet:

'For button
btnOrder.Attrib utes.Add("oncli ck", "window.open('o rder.aspx?..... ........

'For datagrid
<asp:TemplateCo lumn>
<ItemTemplate >
<a href="#" onclick="window .open('Modules/AR/order.aspx..... ....">Order</a>
</ItemTemplate>
</asp:TemplateCol umn>

In both instances I use window.open on client side to pop up new window.
The strange thing is, at some occasions I have to use Modules/AR/order.aspx
to open, at other I will have to use the file name order.aspx only without
the path.

The struture in my machine: I have a ASP.Net web application in
http://localhost/Dev. all related aspx files are located in
http://localhost/Dev/Modules/AR directory.

Right now I have to try and err every time to find out if I need to add path
to the filename.

Can somebody suggest a better way to do this? I don't think using absolute
path can resolve my problem either, becase my current application is at
http://localhost/Dev , the application could be moved to
http://someserver/Live or others.
so /dev/Modules/AR/order.aspx is no good for me either.

TIA
Nov 18 '05 #1
1 1235
Hi Danny,

another option would be to add an entry to the Web.Config that
specifies the current path to use. It could look something like this :

<appSettings>
<!-- Test Setting -->
<add key="ActiveAppP ath" value="http://localhost/Dev"/>
<!-- Live Setting -->
<!--add key="ActiveAppP ath" value="http://localhost/Dev"/-->
<appSettings>

Then grab the path from the config.
Hope this helps.

Tod Birdsall
http://tod1d.blogspot.com

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

38
5092
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find out what i'm doing wrong, and so far it seems i'm doing it the right way. Here's my code...any suggestions would be appreciated. <script language="javascript"> <!-- window.open("256fx/index.htm", "", "height=400, width=600"); //-->
9
2022
by: Tom | last post by:
I have created the following code for a product select/payment form (don't know if there is a better way) and I have been trying to make the following changes (unsuccessfully so far): 1) Eliminate the submit button and submit the form with onchange. 2) Open the action php page in a new window. I am using this code for different payment options (i.e., cc processing and paypal). As such, there are multiple forms on the page. The...
3
2080
by: Steve K | last post by:
After reading Harlan's post about popups some of my questions were answered but.. I was going to use differnet popups on a lot of my pages. These popups contain bios on Cornell faculty. Two days ago this was the best place to put this info, that was until I tested it on my officemates computer where she has Adzapper installed and it killed the popup before it could be read. I assumed MANY people have this or similar software. So, the...
4
2011
by: Raymond Wilk | last post by:
I used javascript to open a new window, then used the following to close the new window on the next click: <body onBlur="self.close()" onClick="self.close()" bgcolor="#FFFFFF"> On the new window I want to place a link to another website, and I want the new window to open the link in ANOTHER new window (not the parent window) and then self close. The idea is that on the first new window I have a picture, and a link to another website...
12
1473
by: Mal Ice | last post by:
I am creating an initial index.htm page on which I show some disclaimers and introduction information. In the head section I have Javascript which determines the screen resolution of the client. I assign values to two variables to assign the width and height. (my_width and my_height). I have a Form button which is clicked on agreeing to the disclaimers. On clicking the form button I want to direct the user (open a new window) to a...
3
6202
by: datactrl | last post by:
Hi, all When I use window.showModelessDialog() to open a window. And then on the opened window to open an another window with the same function, window.showModelessDialog(). The last opened one is always on the top of the first opened one. Is there any "work around" to have the first opened one go to the front? Thanks in advance! Jack
0
6438
by: Michelle Keys | last post by:
I am trying to call a print function to print a string from a database using javascript. Which is RC_DATA of Varchar2(2500). This is a javascript is not being used. I have a thing that needs to be modified: if(e.CommandName =="Print") { string parsedreceipt = null; parsedreceipt = DecodeReceipt (e.Item.Cells.Text); Session = parsedreceipt;
1
976
by: Luis Esteban Valencia | last post by:
I hope this is an easy question, but I'm not sure. I want to open a new window using code behind. I have no problem doing this. I just push javascript and make it open a new window. Now heres the hard part. HOW do I open a new window with a diffrent session. Let me give you an example of my problem. I have 2 diffrent web sites, each with thier own domain. I want to be able to open a new window from web site A to web site B and still keep...
11
4947
by: Dave | last post by:
For some reason, the below lines only work on select machines. All machines are running IE6. IE SP's and OS's vary. When it doesn't work, default.aspx (the page that this code is in) opens and closes. That's all you see. TSReminder.aspx doesn't even open. I'm not sure what's going on here. Response.Write("<script...
4
3270
by: arajunk | last post by:
In Firefox this opens a full size window (maximized) . In IE it opens the partial window requiring user to click restore (upper right) to maximize. What am I missing ? var infoWindow=window.open('usgsMain.html','USGSwindow','status=no,resizable=yes,scrollbars=yes');
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10468
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10245
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10205
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9063
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7559
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5458
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2933
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.