Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Update Webpage from Applet?

 
Matt Wil
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is there anyway for an Applet to update or load a new webpage? I have an Applet that edits the a large image. I want to send the file back to the web server and the present a hyperlink on a webpage for a user to click and download it. I know sending the file back to the web server is inefficient, but I want to avoid the user being prompted to access their file system. Thanks!
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Matt
If you are aware of using LiveConnect (netscape.javascript package) that can be used to invoke/access Javascript in the HTML page where the Applet is then you can apply following logic,
- once image editing is done in the applet you upload it to the server by opening a stream to the server. At this point you would remember the location where you uploaded on the server and make sure that you upload the file to "web accessible" folder
- once the file uploaded, invoke a Javascript's method that pops up (or reloads the current page, whatever is good for you) a window with the URL of the file you just uploaded
I guess this would solve your problem.
Now, if you want to use this LiveConnect thing then the applet tag must have "mayscript" attribute defined as "true" ...you would find this in the documentation or help you would end up after googling things for netscape.javascript package and all...
Hope this helps. Let us know if you face more problems..
Regards
Maulin
 
Joe Ess
Bartender
Posts: 9340
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can load a new URL in the browser containing your applet like so:

The URL can be to the file you want the user to download or an HTML document that points to/contains it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic