This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Applets and the fly likes JavaScript and JApplet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "JavaScript and JApplet" Watch "JavaScript and JApplet" New topic
Author

JavaScript and JApplet

Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
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

Joined: Jul 26, 2007
Posts: 10172
    
    8

More suitable in Applet forum.
Moving


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
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.


Ping & DNS - my free Android networking tools app
Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
Don't like to hardcode the value in the PARAM tag. Like to pass some values from the url.


Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
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

Joined: Oct 08, 2008
Posts: 492
This helps me out....This is the only script working in IE and other Browsers

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaScript and JApplet
 
Similar Threads
JApplet within JInternalFrame...Please help
swing application to servlets
JApplet to JApplet Communication
HELP: JApplet graphics problem
How to access to ValueStack from xml?