wood burning stoves
The moose likes HTML, CSS and JavaScript and the fly likes window.open() problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "window.open() problem" Watch "window.open() problem" New topic

window.open() problem

Ritesh Mehta

Joined: Sep 20, 2004
Posts: 4

I have a folder "html" where I have all my html code. Within this folder, I have another folder "html_cust" where I have specific code. From one of the html in the "html_cust" folder I am referring to html pages, gifs, css in the "html" folder.
For this I just specify the file name in the href syntax and make use of <base> tag to point to "html" folder. This works fine for href, img and including css files.

But when I use the window.open() function and specify the html file name in "html" directory, it gives me "Page not Found" error. It tries to look for the file in the current directory only, despite of specifying <base> tag.

Can anyone please tell me what am I doing wrong. Thanks for your help.

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
do you have any sample code?

Ritesh Mehta

Joined: Sep 20, 2004
Posts: 4
File in html directory : Prm_SelectMilestones.html
File in cust_html directory : test1.html (calls Prm_SelectMilestones.html from window.open function)
<base href="http://gendev02:30/lucSOX/" /> is mapped to html directory.


<title>Dep ID</title>

<base href="http://gendev02:30/lucSOX/" />

<link rel="stylesheet" type="text/css" href="PMOWS_styles.css">
<script LANGUAGE="JavaScript">
function popupRelatedMileStone(){
window.open("Prm_SelectMilestones.html", "child1","position=relative,scrollbars=yes,resizable = true width=500 height=400 toolbar = false status = true menubar = false");




<a href="javaScript opupRelatedMileStone()" >

I agree. Here's the link: http://aspose.com/file-tools
subject: window.open() problem
jQuery in Action, 3rd edition