Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaScript and JApplet

 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Am invoking a JApplet in the browser and I need to pass few parameters to JApplet init method from the url of the browser.

I tried with getParameter and its not working. Please help me out.

Any way to set the value from java script
<PARAM NAME=Title VALUE="This is a Title String">
 
Maneesh Godbole
Saloon Keeper
Posts: 11070
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More suitable in Applet forum.
Moving
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ItDoesntWorkIsUseless. Post the full applet tag, the Java code that tries to retrieve the parameter values, and describe what is happening when it's run.
 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't like to hardcode the value in the PARAM tag. Like to pass some values from the url.


 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The page can be a JSP/PHP/ASP page, where the parameter value is inserted dynamically on the server; I wouldn't call that "hardcoding". Or is this an environment where server-side processing is not feasible?

So how are you using getParameter, and how is it not working? Or are you no longer using that at all? TellTheDetails
 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This helps me out....This is the only script working in IE and other Browsers

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this page was generated on the server, you could check the cookie there, and put an appropriate value in the param tag. I'd consider that more reliable than using JavaScript.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic