• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

html+applet+servlet=how to do

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have two values that i need to pass to a servlet, one is available on the html page, the other is available in a java applet on the same page.
i am using a regular submit button on the html page, not the applet
i know how to pass the value located on the html page, but not the one in the applet.
do both values have to be in either the html or applet for them to both be passed to the servlet, or can i pass one from the html and one from the applet?
the easiest solution for me would be if I could pass the value from the applet to a hidden input box on the html, then pass both to the servlet
If anyone has any input it would be appreciated
thanks
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello "speedstic speedstic"-

Welcome to JavaRanch.

Some housekeeping first: This site has a naming policy, and your display name does not conform to it. Please correct it.

Also, please do not post questions to several forums, like you have done here.

As to your actual question: What you ask is possible, and the submit could happen through the applet or through the HTML form, although it may not work with every browser. The technology you need to use is called LiveConnect, and is described in more detail in the Applet FAQ, which is linked in my signature.
[ November 27, 2005: Message edited by: Ulf Dittmer ]
 
Gerald Hanson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oh sorry bout the name thing, i didn't realize that i had input the name twice!
and thank you for answering my question
 
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"speedstic", it wasn't the double name that was the problem. Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to you next post,

bear
Forum bartender
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

or can i pass one from the html and one from the applet?


The simplest thing to do is have Javascript grab the value from the applet and set it as a hidden field in the form. Variables in the applet class that are public can be accessed by Javascript using the name you set for the applet.
Bill
(how people miss that naming policy when signing up, I'll never understand - we like to know who we are talking to.)
 
We begin by testing your absorbancy by exposing you to this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic