Results 1 to 5 of 5

Thread: Problem with window.showModalDialog

  1. #1
    Join Date
    Nov 2009
    Posts
    652

    Problem with window.showModalDialog

    Hey,

    I have developed a program in which a button is placed and when i clicked on that button a new widow will appear using the JavaScript. The problem is that when use it with the "window.open" method it works properly but the actual problem arise when i am using it with the window.showModalDialog. When i use the Window.showModalDialog method it is not working according to me.

    Help me.

  2. #2
    Join Date
    Jan 2008
    Posts
    3,388

    Re: Problem with window.showModalDialog

    Hey,

    I am forwarding the code and i think it will work with you. So make the change according to your requirement and then check whether it is working or not. All you have to do is that just pest this code in your buttons click event.


    Code:
    function ShowDialog()
    {  window.showModalDialog("name of the form"); }
    function CloseDialog()
    {  window.close();}
    Thank you

  3. #3
    Join Date
    May 2008
    Posts
    4,345

    Re: Problem with window.showModalDialog

    Hey friend,

    Just try this code and see whether it will help you with the proper solution. It helps with the same problem which you are facing. So try your luck also to solve the same. And don't forgot mention Thanks if it works for you.
    Code:
    var childWindow;
    function ShowDialog()
    {childWindow = window.showModalDialog("Form name");}
    function CloseDialog()
    {childWindow.close();}
    Bye

  4. #4
    Join Date
    May 2008
    Posts
    2,012

    Re: Problem with window.showModalDialog

    Hey brother,

    I think you problem can be solved bye the changing the base target to the self mode. Because the problem you are facing is because of the base target is changing to the some other mode. Just add this to the your form's code of the child window. Thats all i can help you with this. Hoping that it will work for you.

    Code:
    <base target="_self">
    Thank you

  5. #5
    Join Date
    May 2008
    Posts
    3,316

    Re: Problem with window.showModalDialog

    Hi there,

    If all the above is not working then use the linking of the form to the 2nd form. It will link the two form together to work with each other. All you have to do is that just write the code and the link and close the windows method at the end of the code.

    Code:
    window.dialogArguments.location.href = 
    function CloseWindow()
    {childWindow.close();}

Similar Threads

  1. Window 7 Pro VPN problem
    By ALFFRED in forum Networking & Security
    Replies: 5
    Last Post: 22-01-2010, 02:16 PM
  2. JFrame window problem
    By cyber-noob in forum Software Development
    Replies: 2
    Last Post: 09-11-2009, 11:45 AM
  3. Problem with close window in PHP
    By Duck in forum Software Development
    Replies: 3
    Last Post: 08-04-2009, 08:57 AM
  4. Problem With Window 7 Beta
    By Amaresh in forum Operating Systems
    Replies: 4
    Last Post: 25-03-2009, 11:20 AM
  5. Having web cam problem on Window vista
    By Samsher in forum Operating Systems
    Replies: 3
    Last Post: 28-01-2009, 10:40 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,640,114.25808 seconds with 16 queries