• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Opening a new browser window from the applet and supplying data via POST

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've got a request in to add a button to one of our applets that will launch a web page in a new browser window.

We've done this before using getApplet().getAppletContext().showDocument(url, "_blank"); with any data we want to supply added to the URL's query string (usually encrypted and URLEncoded).

This time around though I'm being told that they want the data submitted via POST. My understanding is that this is not directly or easily doable without some intermediate steps.

Any thoughts or suggestions?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It would be tricky, to say the least. One approach might be for the applet to call a JavaScript method on the same web page that the applet is on, passing along any data it needs. The JavaScript could then create an HTML form on the page that contains all the data, and submit that via a POST to a new window (using target="_blank" in the form). The form could be in an invisible IFrame, so that the user doesn't see it.

I'm not sure if this would work, but I don't see a fundamental problem why it wouldn't.
 
reply
    Bookmark Topic Watch Topic
  • New Topic