Get Rid of '-- Web Page Dialog' in Title Bar

F

Fred

I have implemented a dialog box (an aspx page) using showModalDialog.
Because the dialog needs to process postbacks, I have implemented it in a
frameset. In the top of the framset page, I have defined a title as follows:

<title>My Title</title>

At runtime, the text in the title bar appears like this:

My Title -- Web Page Dialog

How can I cause the dialog to appear with my title only - i.e., without " --
Web Page Dialog" getting appended to my title?

Thanks!
 
K

Ken Cox [Microsoft MVP]

Hi Fred,

I think you'll find that the text is hardcoded into Internet Explorer...
Just the same as the way Internet Explorer appears in the regular browser
title bar. It is probably in the Registry somewhere but that doesn't help
you much.
 
F

Fred

Hummm, maybe... here's the deal: I have a demo application that I've been
disecting. It has modal dialog boxes that do not display that text in the
title bar ("-- Web Page Dialog"). So, is it possible that the demo app opens
the dialog box using something other than showModalDialog()? I don't have
access to the compiled source of the demo, so I can't discover for myself
what it is actually doing.

One observation I have about it is that the authors seem to have found a way
to do modal dialog boxes that do postbacks without needing to have a
frameset. I'd like to model that, however after trying lots of things I went
with Bruce Barker's recommendation to place the aspx within a frameset (the
only way I've found to do a modal dialog that can do postbacks). Not to go
off on a tangent -- my point is that it seems like the demo application I'm
disecting does modal dialogs in some special way. Whatever they are doing
apparently doesn't require a frameset and doesn't have that annoying text in
the title bar. Any thoughts on what they might be doing?

Thanks again.
 
F

Fred

Slight modification to my previous post - they are using showModalDialog...
found it in their JavaScript... just substituted my aspx frameset page for
their aspx page name in the js, and mine shows that text ("-- Web Page
Dialog"). Could it have to do with the fact that I'm using a Framset and
they are not?
 
H

Hans Kesting

Fred said:
Slight modification to my previous post - they are using showModalDialog...
found it in their JavaScript... just substituted my aspx frameset page for
their aspx page name in the js, and mine shows that text ("-- Web Page
Dialog"). Could it have to do with the fact that I'm using a Framset and
they are not?

Just a guess, what are they using as title?
If you manage to get a lot of spaces after the "real" title, the postfix
might be added, but somewhere outside the titlebar.

I don't think it has anything to do with framesets.

Hans Kesting
 
K

Ken Cox [Microsoft MVP]

Clever idea.... just push the appended content out where it won't be seen!
 
F

Fred

Right You Are! When I first looked at the aspx in question,I wondered what
all the &nbsp; were all about. Now we know. Here's what they have:

<title><%= GetString("pTitle") %>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</title>

They probably have so many because the modal dialogs are resizable.

Cheers!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top