This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

using servlets to read data from JS windows  RSS feed

 
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.
 
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?
 
Author and all-around good cowpoke
Rancher
Posts: 13078
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!