473,804 Members | 3,802 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("La unchEDoc.asp?ED oc=" + doc, "_blank",
"toolbar=0,dire ctories=no,loca tion=0,status=0 ,menubar=0,scro llbars=1,resiza ble
=1, width=950, height=580, left=0px, top=100px")

if(subWindow.op ener) {

subWindow.opene r = window

}

subWindow.focus ()

}

Thank you

Paul Moffitt
Jul 23 '05 #1
2 1972
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?t itle="+doc+"&sr c=/LaunchEDoc.asp? EDoc="+doc+"_bl ank"...

Then docloader.asp, or whatever you want to call it, would be a simple
frame or iframe page, such as:
<title><%=reque st("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******@housto n.rr.com (Paul Moffitt) wrote in message news:<c4******* *************** ****@posting.go ogle.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("La unchEDoc.asp?ED oc=" + doc, "_blank",
"toolbar=0,dire ctories=no,loca tion=0,status=0 ,menubar=0,scro llbars=1,resiza ble
=1, width=950, height=580, left=0px, top=100px")

if(subWindow.op ener) {

subWindow.opene r = window

}

subWindow.focus ()

}

Thank you

Paul Moffitt

Jul 23 '05 #2
On 16 Apr 2004 18:08:40 -0700, David <da*********@wd src.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.******@blueyo nder.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
38341
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 pages using the require_once function. That is, each page includes the line <?require_once('PageStart.php')?>
6
2474
by: Don Grover | last post by:
How can I get the page title into an variable to handle in my asp. Don
2
1943
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 maybe this isn't at all possible. But if anybody as an idea it would be great. The code is bellow thx
1
6745
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 of operations In my parent window i click the link which results in popping up the child
1
1835
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 (opener). Normally I would do this in javascript, but I cannot find any client side intelligence in the grid, so I wish to close the window on the select index changed event when I return to the server. I can't remeber how to add an OnLoad...
6
4212
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 assume it's not a clean solution. ParentWindow:
1
2339
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, so I assume it's not a clean solution.
2
1570
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 windows, which is fine. Now from the last window I would like to open another with the same tecnique:
5
2351
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 a complete reimplementation of the whole application, so we would like to gradually port portions of the application to more contemporary platforms like C#. Is it possible for a Win32-based application to encapsulate C# code? I
0
10569
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
10325
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
10315
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
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9140
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
7615
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
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
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
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.