473,387 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Subwindow title bar

We have a Javascript function that opens an electronic document in a
subwindow. The Title bar of the subwindow shows the filepath of the
document. Looking at the script below is there any way to add script
to the function to either not show the path in the title bar or
replace the path with other text?

function launchEDoc() {
var subWindow
window.document.title = "InSight"
if (document.forms[0].EDoc.length){
for (var i = 0; i < document.forms[0].EDoc.length; i++)
if (document.forms[0].EDoc[i].checked)
var doc = escape(document.forms[0].EDoc[i].value)
}else{
var doc = escape(document.forms[0].EDoc.value)
}
subWindow = window.open("LaunchEDoc.asp?EDoc=" + doc, "_blank",
"toolbar=0,directories=no,location=0,status=0,menu bar=0,scrollbars=1,resizable
=1, width=950, height=580, left=0px, top=100px")

if(subWindow.opener) {

subWindow.opener = window

}

subWindow.focus()

}

Thank you

Paul Moffitt
Jul 23 '05 #1
2 1942
document.title is read only, so there is NO WAY to change it after the
page posts with javascript, or anything else for that matter...as far
as I know. You have to do it during load.

My suggestion is to create a frame or iframe page, that accepts your
documents as a parameter, along with whatever you want your title to
say.

For example, change your window.open to start like this:
window.open("/docloader.asp?title="+doc+"&src=/LaunchEDoc.asp?EDoc="+doc+"_blank"...

Then docloader.asp, or whatever you want to call it, would be a simple
frame or iframe page, such as:
<title><%=request("TITLE")%></title>
<body topmargin="0" leftmargin="0">
<iframe src="<%=request("SRC")%>" width="100%" height="100%"
frameborder="1"></iframe>

Then when the window opens, it will have your document in it, and the
title bar will be whatever you passed it in your window.open
statement.
David

pm******@houston.rr.com (Paul Moffitt) wrote in message news:<c4**************************@posting.google. com>...
We have a Javascript function that opens an electronic document in a
subwindow. The Title bar of the subwindow shows the filepath of the
document. Looking at the script below is there any way to add script
to the function to either not show the path in the title bar or
replace the path with other text?

function launchEDoc() {
var subWindow
window.document.title = "InSight"
if (document.forms[0].EDoc.length){
for (var i = 0; i < document.forms[0].EDoc.length; i++)
if (document.forms[0].EDoc[i].checked)
var doc = escape(document.forms[0].EDoc[i].value)
}else{
var doc = escape(document.forms[0].EDoc.value)
}
subWindow = window.open("LaunchEDoc.asp?EDoc=" + doc, "_blank",
"toolbar=0,directories=no,location=0,status=0,menu bar=0,scrollbars=1,resizable
=1, width=950, height=580, left=0px, top=100px")

if(subWindow.opener) {

subWindow.opener = window

}

subWindow.focus()

}

Thank you

Paul Moffitt

Jul 23 '05 #2
On 16 Apr 2004 18:08:40 -0700, David <da*********@wdsrc.com> wrote:

[snipped top-post]
document.title is read only, so there is NO WAY to change it after the
page posts with javascript, or anything else for that matter...as far
as I know. You have to do it during load.


That's not true anymore. Whilst earlier versions of JavaScript marked
document.title read-only, recent browsers allow it to be altered. This is
reflected in the W3C DOM 1 HTML Specification and Microsoft's DHTML
Reference[1].

Mike
[1] Netscape's latest documentation does not list the document host
object, so I can't cite its support. However, Mozilla will change document
titles, so one can assume that it's allowed on Mozilla-based browsers.

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 23 '05 #3

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

Similar topics

6
by: the wonderer | last post by:
This is an elementary question, but I've not been able to find the answer, so here goes: I am developing a site using php. I have the html header information in a file that I include in all the...
6
by: Don Grover | last post by:
How can I get the page title into an variable to handle in my asp. Don
2
by: Hugo | last post by:
Hi all, Well I don't know if it's possible, but I would like to able to read the content of a html file that I've opened in a new window, but do this from the parent html file. I think that...
1
by: Venkat | last post by:
Hi All, I have got two windows namely parent and a child . My parent window has got a link, on clicking which opens a child window(i am using window.open function). I do the following set...
1
by: Marcel | last post by:
I have a subwindow hich displays a grid. When the user selects a row from the grid, I wish to store the selected row ID in session state and close the subwindow, returning focus to the parent...
6
by: Wolf Grossi | last post by:
Greetings, how to refresh a parent window after processing forms from the subwindow? Currently I have a solution (see below) which works with IE and Konqueror, but not with Firefox, so I...
1
by: Wolf Grossi | last post by:
Greetings, how to refresh or reload a parent window after processing forms from the subwindow? Currently I have a solution (see below) which works with IE and Konqueror, but not with Firefox,...
2
by: nicofari | last post by:
Hi all, I would need to open a "subwindow of a subwindow". From first page (say "main.html") I open a window using javascript window.open('form1.html',...) After that I have two browser...
5
by: digory | last post by:
Hi Our product consists of a complex application that is written in C/C++ and uses the old event-based Win32 API (some code has already been in there in times of Windows 3.11!) We cannot afford...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...

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.