Win a copy of Rust Web Development this week in the Other Languages 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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

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?
Posts: 43027
  • 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.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic