Solved

server name in window.open

Posted on 2011-09-27
1
253 Views
Last Modified: 2012-05-12
Hi everyone, I'm using a script command in my ASP intranet page.   The command is simple:

<script>window.open("myfilename.asp","mywindow")</script>

All was working fine until I have change my server name from "svradm" to "srvhadm" because when using window.open command, it tries to open the file in "srvadm".  

I need this command to open the right file or, at leat, that I can specify where the file is located?   Even when specifying directly svrhadm:80 in the code, it still doesn't wan't to open the file on the new server.

My feeling  is that there is some kind of variable I need to set in windows on my server but I have no idea where.

thank you for helping
0
Comment
Question by:Buropro-Citation
1 Comment
 
LVL 11

Accepted Solution

by:
MacAnthony earned 500 total points
Comment Utility
If you have a <base href="svradmn"> attribute on the header of the page this could cause the issue. Normally window.open should try and open it using the current page's host if a relative path is supplied. If you used window.open('http://srvhadm/myfilename.asp','mywindow'), that should work as well.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now