paramaters html --> java applet<

liunx

Guest
sorry i didn't know if this is th?place to put this question:

i need to give a paramater from a link (html) to a java applet somebody told me to use <param ..>

but i just want to link to another html file and just give a paramater.

i don't get it very well would somebody explain it to me?

thx for readingThis is a shot in the dark... ;)
Since you're in the PHP forum, I'm assuming you want it done with PHP...

So what I understand is this:
You have a page, say link.html, with an anchor link looking something like this:

<a href=http://www.htmlforums.com/archive/index.php/"applet.php?bgcolor=FF0000">Link to the applet</a>

That will send some value you want in the applet.. I chose "bgcolor" as an example, that would change some background colour inside the applet.

In applet.php you would have a tag looking something like this, inside the APPLET element (I think the OBJECT element should be used nowadays though):

<param name="bgcolor" value="<?php echo $_GET['bgcolor']; ?>" />

That will accomplish what you described.. I think.


but i just want to link to another html file and just give a paramater.


if the other file must be .html, then it can be done with JavaScript, I think. It's just a matter of parsing the query string. Not my field though, so somebody in the Client Side Scripting forum would have to help you with that part..
 
Back
Top