I don't know if this is what you're after but here it goes....

you can do like this

First your normal jsp page... bla bla
Say you have these variables...

String var1 = "lost";
String var2 = "and";
String var3 = "found";

<script language="javascript">
function test(para1, para2)
{
  alert("Message : " + para1 + " and "+ para2 + " and this jsp thing
<%=var1%>
}
</script>

<a href="javascript:test('<%=var2%>','<%=var3%>')>Press this</a>


So you can build up the parameters to a script this way...


Combine this with a OnLoad="test('<%=var1%>','<%=var2%>')" and you can open
a new window when the jsp-page is loaded at in clients browser...

Hope it helped...

// Jan

-----Ursprungligt meddelande-----
Fr�n: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]F�r David Stevenson
Skickat: den 22 oktober 2001 12:19
Till: [EMAIL PROTECTED]
�mne: How do I access the static HTML generated by a JSP?


I have a JSP which creates a view of a file query in a browser frame. I want
to be able to submit a JavaScript button function to 'detach' the page from
the frame and open it in its own browser window. Please note I do not want
to re-submit the JSP or the database query.

The JavaScript side of things is no problem, but I would like to know if
there is any way of accessing the actual HTML of the first page so that I
can re-display it in the new window?

Thanks

David

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to