Link to home
Start Free TrialLog in
Avatar of sandeepaher
sandeepaher

asked on

assign value applet param through javascript


i want to assign value to param "cookval" through javascript.
is there there any way like
document.formname.cv.value
since we can assign value to a text box by this method


<applet code=writefile.class  width=0 height=0 id=appwrite>
      <param name="cabbase" value="mycab.cab">
      <param id=cv name=cookval>
      </applet>

<a href="javascript:callme();">callme</a>

<script language="JavaScript">
function callme()
{
      //value to be assigned here
}
</script>
Avatar of Zyloch
Zyloch
Flag of United States of America image

Hi sandeepaher,

Even if you affect the value of the param (which is possible), the outcome will not change because the applet is loaded once, then done. If you are considering this, check out MAYSCRIPT here: http://www.faqs.org/docs/htmltut/applets/_APPLET_MAYSCRIPT.html and http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/java_js.html

Regards,
Zyloch
Avatar of sandeepaher
sandeepaher

ASKER

ok i realise this is illogical since the applet executes only once and it needs all the parameters then.
i need to do this in the applet itself i.e., reading cookies in applet.

actually the this is what the applet is supposed to do,
it should read the cookie and write the cookie information to a file on users machine.

can u tell me what is the method oreading and writing cookies in applet
Unfortunately, my Java skills are quite elementary and amount to making Hello World programs or "Wow, I can change the System.out.print text and it will display differently!" programs. For more help with Mayscript, I recommend you post in the Java section or post a link pointer to this question in the Java section.

Regards...
Well this is an old page of mine, explaining it a bit. http://utopia.knoware.nl/users/sybev/java/JSObject/JSObjectTrue.htm

The applet also needs to be programmed in such a way that it supports receiving data from javascript. Only then it can work. At least that used to be the case in times of IE4 and NS3.
ASKER CERTIFIED SOLUTION
Avatar of devic
devic
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thank you sandeepaher!