Wrox Home  
Search P2P Archive for: Go

  Return to Index  

j2ee thread: Calling servlets from Javascript


Message #1 by "Derek Akers" <derek@e...> on Mon, 6 Nov 2000 12:25:38 -0500
thats a good point. This would work with Navigator 2.0+ and IE3+

chanoch

-----Original Message-----
From: Karega Scott [mailto:karega_scott@h...]
Sent: Monday, November 13, 2000 10:59 PM
To: Java 2 Enterprise Edition
Subject: [j2ee] RE: Calling servlets from Javascript


Chanoch-

You could use frames and client javascript to do the job.
<frameset>
<frame id=fraOne src=page_not_to_reload>
<frame id=fraTwo src=page_to_reload>
</frameset>

1. Page_not_to_reload make a javascript call to submit the hidden form on 
page_to_reload using window.parent.FORM_NAME.submit().

2. Page_to_reload is not visible and contains a form with the data to submit

and a place to store the information. This form should call itself
using <FORM action=page_to_reload method=post>.

3. Page_to_reload also contains serlvet to be execute and client side script

to populate the Page_not_to_reload  data field.

when this page is submit, the servlet executes, passing the data to client 
script, then the client side script eecutes pass the data to the data field 
on Page_not_to_reload...

  Return to Index