0
<applet id="applet" code="myclass.class">
    <param name="Access_ID" value="accessid">
    <param name="App_ID" value="appid">
    <param name="Current_Url" value="ticketurl">
    <param name="Bug_ID" value="bugid">
</applet>

I want to change param values of applet using javascript/ jQuery dynamically. I tried this

jQuery("#applet param[name=\'Access_ID\']").val(accessid);
jQuery("#applet param[name=\'App_ID\']").val(appid);
jQuery("#applet param[name=\'Current_Url\']").val(ticketurl);
jQuery("#applet param[name=\'Bug_ID\']").val(bugid);
jQuery("#applet param[name=\'User_name\']").val("test");
jQuery("#applet param[name=\'os_installables\']").val("recnew/");

This code is working fine, I made sure checking into dev tools of chrome. But I am not getting these values at server side, only getting whatever values written in html code.

Suggestions please

Dairo
  • 822
  • 1
  • 9
  • 22
Mahendra
  • 153
  • 2
  • 5
  • 15
  • Consider using the [deployment toolkit script](http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit) for writing the applet element. All you need to organize by JS/JQuery are the attribute values. – Andrew Thompson Apr 28 '13 at 01:12

1 Answers1

0

Create the whole applet element with jQuery then add it to the DOM. The parameters are passed when the applet is created, it doesn't monitor the DOM after creation. If you need to communicate with a running applet from JavaScript then you'll need to take a different approach.

Community
  • 1
  • 1
robertc
  • 74,533
  • 18
  • 193
  • 177