clicking the submit button , it will send the updated data to the database , my question is, how close the child window after clicking the request and re- load the parent window
------ Solution --- -----------------------------------------
meaning of the landlord is in fact operating current page content to other pages. .
This is also always looking for the time being is not to find a suitable solution. . My current solution is just to redirect to the parent page just
------ Solution ---------------------------- ----------------
submit an event is written in the background of it, what parent page redirection is not on the
------ Solution --- -----------------------------------------
target = "_parent" plus this one? I do not know no useful
------ Solution ------------------------------------ --------
window.opener.location.href = window.opener.location.href; window.close ();
window.opener.location.replace (window.opener.document.referrer); window.close ();
------ Solution ------------- -------------------------------
overloaded : window.location.reload ()
--- --- Solution --------------------------------------------
child window after submitting to jump to a blank page , this blank page where close the child window onload method returns a specific returnValue.
In this case the parent window directly
showModalDialog just executed, get specific returnValue judgment refresh , location.href or can be resubmitted .
------ For reference only -------------------------------------- -
I was redirected , but after the redirect is the page that appears ah ,
------ For reference only ----- ----------------------------------
I was redirected , but after appearing ah redirect in the page ,
------ For reference only -------------- -------------------------
submit submit background processing , background redirect url, screen refresh after the current station is not a script execution you have to open the window , and overlapping windows of ?
------ For reference only -------------------------------------- -
you can be given a code , novices do not quite understand
------ For reference only ----------------------- after ----------------
submit directly off the pop-up window should be able to pop the landlord is a server-side jsp it then re- orientation about the parent page
I personally have not tried to understand why the landlord would appear that the situation is not wrong js after the page redirects or redirect parent page pop-up window and execute the js function tied to a button try on
------ For reference only ----------------------------------- ---- 9th floor
say can always do
------ For reference only ----------------- ----------------------
so users would not exist a short wait time - before refresh after close, seniors have a better way what
------ For reference only - --------------------------------------
Why wait
there ? close no time , at least you can not see .
refresh refresh you need to wait for that slow , not the method of thing.
You do not need to refresh the time , naturally there is no wait, you slow refresh itself , for what has to wait.
------ For reference only -------------------------------------- -
this should be right
------ For reference only -------------------------- -------------
seems window.parent.location.href = "action";
------ For reference only ---------------------------------- -----
background to write server-side jumps can it redirect
------ For reference only ------------------- --------------------
action where you can not use PrintWriter
Then write methods
such
out.write ("");
query () method of your page is displayed js data
------ For reference only ----------------------- ----------------
------ For reference only ----------------------------- ----------
------ For reference only ---------------------------------- -----
personally feel , there is no need to update the page in a new record . You can define a div in the current page ( default hidden , display click to update ) update ( you can use ajax update , lest submit the entire page ) , the background data storage , forward station returns a status and, if not wrong , Front js execution window.location.reload () to refresh the page .
If a new page updated with the submit button handler page, add js code window.opener.location.href = window.opener.location.href to the page ; window.close () ; should be no problem . ( However, the content of this page has been passed to the client , just before the display is turned off , and all feeling very good, when you update the content of the page itself is more is a waste of traffic )
----- - For reference only ---------------------------------------
you are using struts2 write , then, is the result struts.xml components written like this:
namespace
request name
with servlet how to write I do not write their own online to find it
------ For reference only -------------------- -------------------
realize such a function:
1, click Submit to submit the action --- forms [0] submit ().;
2, add the following code to complete the data in Action treatment methods :
String js = " ";
PrintWriter out = null;
try {
out = httpServletResponse.getWriter ();
}
catch (IOException ex)
{
}
out.print (js);
out.close ();
properly properly ! !
------ For reference only -------------------------------------- -
------ For reference only ----------------------------- ----------
click event after the request is a ajax. Then brush the parent window returns to normal , close the window
window.opener.reload ();
window.close ();
------ For reference only ---------------------------------- -----
window.opener.location.reload ();
------ For reference only -------------------- ------------------- after
close the child window and the main window is loaded once again , the main window is equivalent Zaifayici get requests like
- ---- For reference only ---------------------------------------
< br /> Why wait
there ? close no time , at least you can not see .
refresh refresh you need to wait for that slow , not the method of thing.
You do not need to refresh the time , naturally there is no wait, you slow refresh itself , for what has to wait.
can be given a code to look ah say this can not code or write to ah pro
------ For reference only ---------------------------------------
Father window swollen grasping the returnValue value
------ For reference only ------------------------------ ---------
problem is my parent window is a pop-up window ~ ~ ~ how to do ?
------ For reference only -------------------------------------- -
I say you can not figure out the problem and then test, the test is successful then the answer ah
没有评论:
发表评论