Forums Register Login

javascript in jsp

+Pie Number of slices to send: Send
Hi,
I am trying to open a new page in jsp using response.sendRedirect('url')
As, the url should be opened in a diffrent browser, in jsp I have used some javascript which takes the url and opens in a new browser. But, response.sendRedirect("javascript:windowOpen('url');") is showing an error page.
Would some one suggest me how to open a new page in a new window from jsp.
Thanks,
Deep.
+Pie Number of slices to send: Send
The Javascript only acts if placed within the CALLED url.
In the CALLING JSP:
<%
url = url+"#popup; // indicate a pop-up (new) window is needed
response.sendRedirect(url);
%>
In the CALLED JSP, make sure this code is present:
<script>
if (window.location.hash=="#popup")
window.open(window.location)
</script>
Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1063 times.
Similar Threads
How can I control the window size in a JSP page?
Pass parameters with response.sendRedirect
Calling a JSP using Swing
Page Redirection in a JSP
HttpRequest carry-over
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 13:39:10.