General discussion

  • Creator
    Topic
  • #2083523

    Windows, Parents, Children…help!

    Locked

    by sgroner ·

    I have a parent form which contains an IFRAME named lstEducation, which lists all the education items for a record. Outside of that IFRAME on the parent form I have an ADD Button. When that button is clicked it opens a Modal Web Dialog Window withthe Education Entry form on it. Once I enter my data and click on my Save Button I want it to Save the record, Close the Modal Dialog Window, and then refresh that IFRAME to show the newly add item. Any ideas? I got the Window to close, and the save to happen but the refresh of the IFRAME or the Parent window does not work very well. BTW I really do not care which order the close and Refresh happen.

All Comments

  • Author
    Replies
    • #3768825

      Windows, Parents, Children…help!

      by cedric king ·

      In reply to Windows, Parents, Children…help!

      What language are you using? If the language that you are using allows Javascript, then perhaps you can call a script on “OnBlur” or any similar event of the modal window. The script should reload the page. The syntax will be something like “window.document.frame.location.href = “(URL)””.
      Alternative, you can use Meta tag “Refresh” and set it to a short period of time, such that when the modal window is close and with the refresh timing being short, it will seems that it refresh upon closing of the modal window.
      Hope I understand what you ask and this solve your problem.

      • #3768812

        Windows, Parents, Children…help!

        by sgroner ·

        In reply to Windows, Parents, Children…help!

        Sorry this is not going to work, I do not want to lose what is in the parent form.

    • #3770224

      Windows, Parents, Children…help!

      by kirya ·

      In reply to Windows, Parents, Children…help!

      I think you must have some server-side script to Save the record, so in this script you can output to client’s browser something like :

    • #3770223

      Windows, Parents, Children…help!

      by lastorck ·

      In reply to Windows, Parents, Children…help!

      From point of view WinAPI you can direct to repaint parent with InvalidateRect() (or InvalidateRgn()) and UpdateWindow() (u can also use RedrawWindow() ). You must have HWND of parent. Hope it may help you if you find analogue in your language.
      Regards

    • #3769889

      Windows, Parents, Children…help!

      by cedric king ·

      In reply to Windows, Parents, Children…help!

      Alternatively, you can save whatever you have in your parent frame into database so that when you refresh the page, it will be reflected. When you refresh a page, all data that is entered on that page remains on the screen only. Only when you submitit, i.e. write into database of some sort, will it be reflected when you refresh the page.
      If the above is not feasible, you can use javascript to point to the element and write the data from the child window to it. The javascript will need to be in the child window and executed before it is closed.
      When you say you don’t want to lose your data in the parent window, is it because you want to save into the database only when all the data is entered? If that is the case, the only solution that I can of now is to use elements in forms and point to the particular field and write into it.
      Hope this solve your problem.

    • #3791522

      Windows, Parents, Children…help!

      by sgroner ·

      In reply to Windows, Parents, Children…help!

      This question was closed by the author

Viewing 4 reply threads