Forums Register Login

Forwarding the current page to previous page

+Pie Number of slices to send: Send
Hi,

my first page in my project is a jsp page which selects a network and clicking start button,a dialing process will happen through a servlet which forwards to a jsp page in one frame which selects a network and a stop button and another frame displays which network is selected.if i stop the button in the first frame,the selected network should be stopped and the two frames should be closed and open the jsp page which is used to start the network.
The following code stops the network selected and closes the two frames.But it oens the jsp page which stops the network.

How should i forward the page or redirect the page to the start page.

Thanks in advance
+Pie Number of slices to send: Send
It looks to me that StopServlet is doing the required functionality, so from this servlet forward the request to the page where ever you want.
+Pie Number of slices to send: Send
Thanks.I have already tried like that.But The changes are made only in the top frame.The second frame still appears
+Pie Number of slices to send: Send
What exactly do you want? Only a window will appear without any frames?
+Pie Number of slices to send: Send
what i exactly need is on clicking the stop button,the selected network should be stopped and the two frames should be closed and the main page should be displayed again.

Thanks
+Pie Number of slices to send: Send
From StopServlet instead of using forward action, use sendRedirect to the main page that might solve the problem, provided you dont have any scoped attribute values set.
+Pie Number of slices to send: Send
I have used send redirect too.But the second frame is not yet closed
+Pie Number of slices to send: Send
Should work now, in java script instead of location.href use parent.location.href

i.e.

your present code is

location.href=locationRequest;

try with

parent.location.href=locationRequest;
+Pie Number of slices to send: Send
Thanks.It works fine in internet explorer.But in mozilla,It displays the stop page instead of start page
+Pie Number of slices to send: Send
You mean after execution of the servlet, in mozilla its behaving differently with the same redirect url from servlet?
+Pie Number of slices to send: Send
Apart from that I dont find any use of history.forward and document.write in your code.
+Pie Number of slices to send: Send
Thanks a lot .Now its working fine in mozilla too.
instead of using stop as ahref ,I changed stop as button.Now it is working fine.


Thanks again
It was the best of times. It was the worst of times. It was a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2903 times.
Similar Threads
pass a variable in the URl
running servlet after the browser is closed
page refresh problem
jquery accordion is causing jquery treeview picker to breakup
have problem with multiple forms on a jsp
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:47:06.