Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
122
rated 0 times [  129] [ 7]  / answers: 1 / hits: 17184  / 13 Years ago, mon, november 7, 2011, 12:00:00

I am popping out a child window from parent window.Now, in child window, I have a html form that a user will fill and submit and request will go on server site.Now, I wanted response to this request redirected to parent window and my child window automatically closed out.Hope I am clear enough. If not let me know. thank you in advance.


More From » javascript

 Answers
12

Check jQuery Popup Window Return Value to Parent



basically the logic can be:




  1. You response returns a page that contains a hidden-div that contains the message you want to display (hidden with CSS set display:none;)


  2. That child page returned also contains some JavaScript that fills in the parent window with the DIV content, parent/* or opener */.document.getElementById(...).innerHTML = ...;

    or calls a function on the parent to tell it it's now complete, like window.opener/*or parent*/.formIsComplete(); where formIsComplete() is a JavaScript function in the parent document/window.


  3. The last line of the JavaScript on the child window, will close itself, as simple as window.close();.



[#89266] Saturday, November 5, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jamilab

Total Points: 687
Total Questions: 88
Total Answers: 86

Location: Antigua and Barbuda
Member since Sat, Apr 24, 2021
3 Years ago
jamilab questions
;