| Author |
using servlets to read data from JS windows
|
Sri Sar
Ranch Hand
Joined: Mar 25, 2004
Posts: 44
|
|
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
Joined: Nov 18, 2003
Posts: 91
|
|
|
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
Joined: Mar 25, 2004
Posts: 44
|
|
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
Joined: Mar 22, 2000
Posts: 12324
|
|
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
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: using servlets to read data from JS windows
|
|
|