• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using servlets to read data from JS windows

 
Sri Sar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i want to know if the following is possible:
in my HTML/JavaScript form, the final output is displayed in a window (say named as 'mywindow'). ie the window.open() and the document.write() functions are used to get the final ouptut. now, is it possible to use servlets to read and/or manipulate the contents of this window (ie mywindow)??
thanks in advance.
 
Greg T Robertson
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be able to feed the data from that window back to your servlet like you do with any other form. Assuming it's a form. Similarly if your window is being opened by another form it's contents could come originally from a servlet.
 
Sri Sar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi greg,
thank u for the reply but i am afraid i will have to trouble u with one more question:
actually the content of my window is something like:
<choose>
<figure>C:\My Documents\ads.jpg</figure>
</choice>
now can i write a servlet that reads the content of the window and thus extracts the 'ads.jpg' file?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only thing a servlet can see is a request, such as form submission. However, if your JavaScript is writing the document that is being shown, it can also write the same material to a variable that is submitted as part of a request.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic