showModelessDialog

O

oeyvind toft

I`m dynamicly creating a doc for a modeless window in IE 6..

win= showModelessDialog(oArgs, window, sFeatures);
win.document.title = 'some title';

doesnt work.

Any ideas ?

oeyvind
 
R

RobG

oeyvind said:
I`m dynamicly creating a doc for a modeless window in IE 6..

win= showModelessDialog(oArgs, window, sFeatures);
win.document.title = 'some title';
[...]

It could be for a number of reasons - you haven't explained what oArgs,
window or sFeatures are.

Here is Microsoft's documentation, it includes working examples (though
I didn't test them).

<URL:http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/showmodelessdialog.asp>

Needless to say, showModelessDialog is a Microsoft invention that is
not well supported in other browsers (if at all).
 
O

oeyvind toft

It could be for a number of reasons - you haven't explained what oArgs,
window or sFeatures are.

thanks Rob

The oArgs, window and sFeatures stuff isnt importaint here.

What puzzles me is that I cant do 'win.document.title = 'some title';'

Oeyvind
 
R

RobG

oeyvind toft wrote:
[...]
What puzzles me is that I cant do 'win.document.title = 'some title';'

Ah, so you are trying to change the title element of the document in
the child window?

There is a previous thread regarding changing the title of the current
document that may be useful on 17 Sept. Search the archives for:

"How do I change the document title?"

In case you can't find it, some relevant parts are below:

Yann-Erwan Perio said:
Richard Trahan wrote:

[changing title of the document]
In the interest of higher education, what was wrong with my node method?


According to the DOM/HTML specification the HTMLTitleElement inherits
from HTMLElement, which itself inherits from the core Element interface,
which gives it appropriate DOM methods. Since HTML defines the content
of TITLE as PCDATA, the title should be able to have text nodes and
change their node values.

However, AFAICS, the specification does not state that the [normalized]
text nodes inside the title should be considered as the title's value:)

While IE has therefore decided to not create a text node, Mozilla and
Opera have however made the decision to have a text node for the title
value; in this regard, since changing the node's value does nothing, it
could probably be considered as a "bug" in those browsers, but certainly
not in regards of the reference.

Apart from altering document.title, there's another standard way to
change the title, though probably less supported: change the text
property of the TITLE element.
 
O

oeyvind toft

Thanks a lot for your help Rob.

However, I`ve deicded to use a premade html file as the modeless window
source instead of
a dynamicly created one. Saves me more trouble with this title thing...

(I`m able to set the title on the dynamicly created modeless, but it just
doesnt show up
in the title bar. And I dont know how to 'sneak' in the title via the
showModelessDialog method).

Thanks for the effort !

Oeyvind
 
R

Razzbar

RobG said:
Needless to say, showModelessDialog is a Microsoft invention that is
not well supported in other browsers (if at all).

It should be, though. Dialog boxes have been on computer screens for
twenty years!

FURTHERMORE: Modeless dialogs can be faked with a new window, but a
modeless dialog can not, except for 'confirm()', 'alert()' and
input(). The programmer can not create a general modeless dialog
except for MS browsers. When you need a modeless dialog, you
reall do NEED one.

ALL browsers should support modeless dialogs!
 
R

Razzbar

DAMN IT, why don't I proofread my posts?!?!?!?!?

I wrote 'modeless' when I meant 'modal'. This is what I MEANT
to say...


RobG said:
Needless to say, showModelessDialog is a Microsoft invention that is
not well supported in other browsers (if at all).

It should be, though. Dialog boxes have been on computer screens for
twenty years!

FURTHERMORE: Modeless dialogs can be faked with a new window, but a
***modal*** dialog can not, except for 'confirm()', 'alert()' and
input(). The programmer can not create a general ***modal*** dialog
except for MS browsers. When you need a ***modal*** dialog, you
reall do NEED one.

ALL browsers should support ***modal*** dialogs!
 
R

RobG

Razzbar wrote:
[...]
It should be, though. Dialog boxes have been on computer screens for
twenty years!

Hmmm, that's a matter of philosophy. A browser is very different from
a standard application platform. Your content is being hosted in
someone else's application, so you should play by their rules. If you
want full control of the UI, write a standard application in C++ or
Java or whatever. Or write your own browser that does provide modeless
dialogs and ask users to only use your browser on your site.
FURTHERMORE: Modeless dialogs can be faked with a new window, but a
modeless dialog can not...

Errr, not quite sure what you mean.
except for 'confirm()', 'alert()' and
input().

But some sites still try to use confirm and prompt dialogs to get you to
click on the few modeless dialogs that are allowed.
The programmer can not create a general modeless dialog
except for MS browsers. When you need a modeless dialog, you
reall do NEED one.

It's quite easy to program around modeless dialogs - just accept that
the user is in control. I have yet to find a situation where it was
*impossible* to design around a "required" modeless dialog.
ALL browsers should support modeless dialogs!

I disagree.
 
R

Randy Webb

Razzbar said:
DAMN IT, why don't I proofread my posts?!?!?!?!?

I wrote 'modeless' when I meant 'modal'. This is what I MEANT
to say...





It should be, though. Dialog boxes have been on computer screens for
twenty years!

So have non-modal dialog boxes. Whats your point?
FURTHERMORE: Modeless dialogs can be faked with a new window, but a
***modal*** dialog can not, except for 'confirm()', 'alert()' and
input(). The programmer can not create a general ***modal*** dialog
except for MS browsers. When you need a ***modal*** dialog, you
reall do NEED one.

Example? And if you think you need that much control, write your own App
and stop trying to do it in a web browser.
ALL browsers should support ***modal*** dialogs!

Why?

And, how do you suppose a modal dialog should work in tabbed browsers?
 
R

Razzbar

Randy said:
Razzbar wrote:

[modal dialog box not supported by most browsers]
So have non-modal dialog boxes. Whats your point?

There are times when a modal dialog is the best way to do
something.

Any time the user has to do something before continuing.
And if you think you need that much control, write your own App
and stop trying to do it in a web browser.

Are you serious? Why have javascript at all? Sheesh, web pages
aren't just plain text any more. You can have interactivity, you
can deploy all kinds of real applications.


Because they are a common feature of all common GUI's, and there
are times when they are the most appropriate thing to use. Just
because there are some misuses of them out there does not mean
they should not ever be used. I think it's simple-minded zealotry
to say -never- use them. There are times when a user has to do
something before continuing.


And, how do you suppose a modal dialog should work in tabbed
browsers?

Modal just to the tabbed window of course.
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top