473,406 Members | 2,713 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,406 software developers and data experts.

showModalDialog, IFRAMES, and document titles

I have researched the issue of setting the title of a window created
with a call to showModalDialog. I have found numerous articles, but
nothing that answers my particular case (Code abbreviated for
simplicity):
in spawner.aspx -

<script>
window.showModalDialog('dialog.htm');
</script>
in dialog.htm -

<html>
<body>
<iframe src="iframe.aspx"></iframe>
</body>
</html>

in iframe.aspx - not important

----

what script should i stream back to the client from the iframe.aspx
code-behind so that the title of the dialog window is changed at
run-time? i have seen articles that spoke of a bug with dialogs that
prevent DHTML methods for setting the title, but supposedly it can be
set on the server side.

I have yet to see a working example of this.

Thanks for any help you can offer.

Nov 19 '05 #1
3 3545
You should use

<script language="javascript">
document.title = "My new Title";
</script>

http://support.microsoft.com/default...b;en-us;296113

If there is a bug with it, I can guarantee this is not something that can be
fixed on the server side. The server just generates the html to send to the
browser. The html sent is what defines the title.

bill

"PeeBee" <p.*************@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I have researched the issue of setting the title of a window created
with a call to showModalDialog. I have found numerous articles, but
nothing that answers my particular case (Code abbreviated for
simplicity):
in spawner.aspx -

<script>
window.showModalDialog('dialog.htm');
</script>
in dialog.htm -

<html>
<body>
<iframe src="iframe.aspx"></iframe>
</body>
</html>

in iframe.aspx - not important

----

what script should i stream back to the client from the iframe.aspx
code-behind so that the title of the dialog window is changed at
run-time? i have seen articles that spoke of a bug with dialogs that
prevent DHTML methods for setting the title, but supposedly it can be
set on the server side.

I have yet to see a working example of this.

Thanks for any help you can offer.

Nov 19 '05 #2
Bill,
thanks for the response. i thought the "server side" approach sounded
odd. here is the article i was referring to when i spoke of the
"server side" solution:

http://support.microsoft.com/default...b;en-us;263033

Here is the quote:

"RESOLUTION
To work around this problem, you can use Active Server Pages (ASP)
script or another application server framework to set the title from
the server side. There is no known alternative way to change the title
from client-side script. "
Whatever that means ... you're guess is as good as mine.

Thanks again.

Nov 19 '05 #3
What this is saying is when a modal or modeless window is opened, it will
look for the title tag and place that title in the window bar. For IE
dialog boxes, the title can not be changed one the dialog is created.

When it is suggesting "server side", it it suggesting writing out the
<title> tag dynamically before the html is sent to the client's machine and
the dialog processed.

With dialog.htm being your modal page, it doesn't look like you are going to
be able to set the title based on the frame.

bill

"PeeBee" <p.*************@gmail.com> wrote in message
news:11*********************@l41g2000cwc.googlegro ups.com...
Bill,
thanks for the response. i thought the "server side" approach sounded
odd. here is the article i was referring to when i spoke of the
"server side" solution:

http://support.microsoft.com/default...b;en-us;263033

Here is the quote:

"RESOLUTION
To work around this problem, you can use Active Server Pages (ASP)
script or another application server framework to set the title from
the server side. There is no known alternative way to change the title
from client-side script. "
Whatever that means ... you're guess is as good as mine.

Thanks again.

Nov 19 '05 #4

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

Similar topics

0
by: Dan Popa | last post by:
Check out the following 2 links: http://www.batisdev.com/admin/test_1images.asp http://www.batisdev.com/admin/test_2images.asp First page contain 4 IFRAMES and 1 IMG tags. Second page contain 4...
5
by: Frances | last post by:
I need to replace iframes acc. to what option user chooses in a sel obj.. but figured have to load a blank iframe when pg loads so I can replace it.. (iframe gets put in a pre-existing div..) this...
0
by: Jinx | last post by:
Windows IE ..NET PROBLEM: After invoking showModalDialog(), a form comes up, the user clicks submit, and a NEW webpage opens. SOLUTION After reading numerous posts that say, paraphrased,...
1
by: Ben Schumacher | last post by:
I keep getting a script error (Expected end of statement) when I try to add the following attribute to a <asp:Button server control. My vb.net looks as follows ... Dim sUrl As String =...
8
by: Henrik Stidsen | last post by:
I am trying to access a table in an iframe via javascript. It sounds easy - but it won´t work... The iframe is added to the document via someContainerElement.innerHTML = "<iframe...>", it has...
5
by: Christina | last post by:
I can't seem to find any reference for grabbing the title of the referring page, which I want to use for creating a link. i.e. document.write ("Our thanks to <a href='"+document.referrer+"'>"...
1
by: Dmitry Kulinich | last post by:
var iframe = document.createElement("<IFRAME id='frame0' style='PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px' border='no' name='frame0'...
5
by: Faizmysore | last post by:
This code works good in IE, function multiuser() { document.frmOpenInteraction1.Create.disabled=true; document.frmOpenInteraction1.hidmultiuser.value="Yes"; var r =...
2
by: Stan | last post by:
Hi I am using Visual Studio 2005 for developing a web-site. My pages include a master page. I have a problem with document titles. When I enter them in the property window of the designer...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...
0
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...
0
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,...

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.