Advertisement Jump to content
Sign in to follow this  
ju2wheels

[java] JApplet passing parameters

This topic is 4900 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok I know im doing this right but its telling its only partially working. I load my applet in an html file and pass the following params: <applet ...> <PARAM NAME="bgColor" VAULE="someColor"> <PARAM NAME="envPropWebPath" VALUE="someWebPath"> <PARAM NAME="webPath" VALUE = "anotherWebPath"> </applet> When I go to get envPropWebPath using getParamter("envPropWebPath") I get a null pointer exception, thus meaning that it cant find the give parameter I assume. I did spell it correctly in both places but its still a no go. Any ideas? I dont assume that there is anything different that needs to be done when you supply more than one parameter is there? I had this working perfectly when I only passed it one parameter...

Share this post


Link to post
Share on other sites
Advertisement
You're right this SHOULD work

check for:

1. spelling mistakes (HTML doesn't have a compiler ;))
2. HTML mistakes (unclosed tags, unclosed " (quotes), etc - see above point)

Share this post


Link to post
Share on other sites
I figured out the problem. getParameter cant be called from within a constructor or it wont work!!!!! Ive got it working now.

*and i did check the spelling ;-D 50 times....

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!