need help with ModalDialog

Discussion in 'HTML' started by vetalik, Apr 6, 2006.

  1. vetalik

    vetalik Guest

    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!
    vetalik, Apr 6, 2006
    #1
    1. Advertising

  2. vetalik

    Neredbojias Guest

    To further the education of mankind, "vetalik" <>
    declaimed:

    > 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.

    --
    Neredbojias
    Infinity can have limits.
    Neredbojias, Apr 6, 2006
    #2
    1. Advertising

  3. 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.
    Yukky Korpulent, Apr 6, 2006
    #3
  4. vetalik

    vetalik Guest

    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.
    vetalik, Apr 6, 2006
    #4
  5. 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
    Yukky Korpulent, Apr 6, 2006
    #5
  6. vetalik

    vetalik Guest

    Thank You very much. So the only way is to use window.Open() and onBlur
    event to simulate modal window?
    vetalik, Apr 7, 2006
    #6
  7. 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
    Yukky Korpulent, Apr 7, 2006
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U3JpbWFkaGk=?=

    closing modaldialog window

    =?Utf-8?B?U3JpbWFkaGk=?=, Dec 6, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    514
    =?Utf-8?B?U3JpbWFkaGk=?=
    Dec 6, 2005
  2. laks
    Replies:
    2
    Views:
    3,851
    Eliyahu Goldin
    Feb 19, 2006
  3. Manpreet
    Replies:
    0
    Views:
    276
    Manpreet
    May 22, 2007
  4. Manpreet
    Replies:
    0
    Views:
    344
    Manpreet
    May 22, 2007
  5. Yereth

    IE Modaldialog / winXP-SP2 trouble

    Yereth, Jun 23, 2005, in forum: Javascript
    Replies:
    0
    Views:
    100
    Yereth
    Jun 23, 2005
Loading...

Share This Page