473,587 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.showModa lDialog('dialog .htm');
</script>
in dialog.htm -

<html>
<body>
<iframe src="iframe.asp x"></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 3556
You should use

<script language="javas cript">
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.goo glegroups.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.showModa lDialog('dialog .htm');
</script>
in dialog.htm -

<html>
<body>
<iframe src="iframe.asp x"></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******** *************@l 41g2000cwc.goog legroups.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
2081
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 IFRAMES and 2 IMGs tags. The problem is that the second IFRAME from the second page generates fires a new session.
5
2224
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 is approach.. I'm having some problems and would appreciate some help.. thank you very much... var selItem; var ifrCurr; var div =...
0
2179
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, "This can't be done, you have to use IFRAMES", I thought I just post a solution.
1
1704
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 = "../popup/newfolder.aspx" Dim vArguments As String = "document.all('" & cmdNew.ClientID & "')" Dim sfeatures As String = String.Empty
8
52814
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 name and ID and its visible in my DOM explorer just as the table I need is it. The table is added from ASP.NET via Response.Write(). I have tried...
5
3220
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+"'>" +referring page title +"<a>"). I have looked into using location.history also. This is probably a standard thing, but through all the forums and...
1
17620
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' src='RasteriserServlet?width=200&amp;height=200&amp;bgColor=#FFFFFF&amp;fgColor=#000000' frameBorder='no' width='200' scrolling='no' height='200' menuId='formControlPopup' childName='frame'...
5
6457
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 = showModalDialog('popup.htm','NEW', 'dialogWidth:400px;dialogHeight:155px;dialogLeft:200px;center:1;help: no; resizable: no; status: no; scroll: no;');...
2
845
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 and save the file it appears to work OK. But they have a habit of being reverted to "untitled-page" for no apparent reason when editing the page
0
7918
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7843
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7967
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...
0
8220
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...
0
6621
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...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2353
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
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.