need help with ModalDialog

V

vetalik

Hello!
I have a problem with modal dialog, i need to make possible to copy
text placed in tables from my modal dialog, and paste anywhere client
wants.
in example i have such a script:
<input type="button" name="butt"
onclick='window.showModalDialog("s.html","title",
"height:200,width:400,status:no,toolbar:no,menubar:no,location:no");'>


As a result of pressing button, i receive a modal dialog with content
of s.html - source:
<html>
<body>
some text here
<body>
<html>


but i can't select any number of text, no context menu is working by
right clicking.
So I need to make menus available and tet selectable.


Please help!
 
N

Neredbojias

Hello!
I have a problem with modal dialog, i need to make possible to copy
text placed in tables from my modal dialog, and paste anywhere client
wants.
in example i have such a script:
<input type="button" name="butt"
onclick='window.showModalDialog("s.html","title",
"height:200,width:400,status:no,toolbar:no,menubar:no,location:no");'>


As a result of pressing button, i receive a modal dialog with content
of s.html - source:
<html>
<body>
some text here
<body>
<html>


but i can't select any number of text, no context menu is working by
right clicking.
So I need to make menus available and tet selectable.

I'm not familiar with the showModalDialog function but it sounds like that
is the problem.
 
Y

Yukky Korpulent

A modal dialog, by definition, will not allow the user to interact with
the parent window until the dialog has been closed. If you want to
offer the ability to interact with both parent and dialog at the same
time, you'll need to use window.open rather than
window.showModalDialog.

Yucky,
Yukky.
 
V

vetalik

Yukky, yes i know that modal window won't intearact with parent, but
the problem is that it is impossible to select any text which is not in
<input> tag, in example <p>some text here</p> text won't be selectable,
thus it wonn't be available to copy that text to clipboard. But i need
to be able to copy data to clipboard.
 
Y

Yukky Korpulent

Sorry I misunderstood your question. Apparently, the showModalDIalog
does not bring up a new instance of the browser--just a viewer. As
such it's incapable of allowing selections. I believe your only option
left here is to use a window.open approach, which of course gives you a
fully-functional browser instance (at the cost of losing the modal
behavior.)

Good luck,
YK
 
V

vetalik

Thank You very much. So the only way is to use window.Open() and onBlur
event to simulate modal window?
 
Y

Yukky Korpulent

I would probably avoid the onBlur route unless you are just hell-bent
on making this thing modal. For one thing, a non-javascript-enabled
browser would ignore your attempts to do so. In any event, I seem to
recall others having problems trying to simulate a modal window like
you are describing.

Yukky
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top