This week's giveaway is in the Spring forum.
We're giving away four copies of Microservices Testing (Live Project) and have Chris Love & Andres Sacco on-line!
See this thread for details.
Win a copy of Microservices Testing (Live Project) this week in the Spring 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

problem with getParameter from html page

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, i have this code:
in html file:

<APPLET archive="Awb.jar" code="Awb.Awb" width=850 height=700>
<param name="p1" value="CN" />
<param name="p2" value="1234" />
</APPLET>

and this code in my applet class:
public Awb() {
super();
init();
String awbprefix = getParameter("p1");
String awbnumber = getParameter("p2");
if (awbprefix.compareTo("none")!=0 && awbnumber.compareTo("none")!=0)
{
airwaybill_frame.awbObj.setPrefix(awbprefix);
airwaybill_frame.awbObj.setAwbnumber(awbnumber);
airwaybill_frame.RequestData("request_awb","awb");
}
}

the Awb() method is the constructor of the applet
i can't get the parameters and getting the error unknown source...
i can't figure out what is the problem

10x ahead
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Netanel,
I believe the Applets forum is probably more appropriate for your question.

In any case, from the code you have provided, it looks like you may not exactly understand how applets work. Allow me to suggest the Writing Applets trail in the Java tutorial.

Good Luck,
Avi.
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the Applets forum.
 
And then the flying monkeys attacked. My only defense was this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic