Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Can't accept parameters from an applet

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Please help me out receiving parameters from the following applet.
I have embedded the <applet> tag in my .java source code and when try to run it through the appletviewer it cannot accept any parameter passed. Using an .html file also gives the same result. Please help.

 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Putting the parameters in the applet source code accomplishes nothing (the source is neither examined, nor is it generally available).

There are some exceptions later on, but reading the parameters works fine for me with the HTML you posted.
 
Prosenjit Banerjee
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could not get you. Kindly explain more.
I tried both from html and also the embedded tag in the source code. But none works.
 
Ulf Dittmer
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does your HTML file look like? (Don't bother posting the source file - applets are started from HTML files, not .java files.)
 
Prosenjit Banerjee
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the html code.
 
Ulf Dittmer
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The applet tag is not being closed.
 
Prosenjit Banerjee
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that is the real mistake. But still the result is the same even after closing the applet tag. It cannot read the applet parameters. If you copy and pasted the code to execute, perhaps then you will understand what is going wrong.

[ January 26, 2008: Message edited by: Prosenjit Banerjee ]
 
Ulf Dittmer
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like I said, reading the parameters worked just fine for me.

There are some exceptions later due to incorrect program logic, though (the loops seem to run from 1 to 11 instead of 1 to 12, and element 0 of the arrays is not initialised).
 
Prosenjit Banerjee
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Mr. Dittmer for going through my code so carefully and giving me solutions. Now it runs correctly. :-)
[ January 26, 2008: Message edited by: Prosenjit Banerjee ]
 
This one time, at bandcamp, I had relations with a tiny ad.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic