469,917 Members | 1,783 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

how to pass JavaScript function and its variables to an applet

i want to create an applet which will call javascript function which is -
Expand|Select|Wrap|Line Numbers
  1. function printreceipt(tax,subtotal,total)
  2. {
  4. subtotalElem=document.getElementById("total");
  7. var taxElem=document.getElementById("tax");
  9. productElem=document.getElementById("product-name");
  11. alert("here are my products" + taxElem.innerHTML + subtotalElem.innerHTML);
i want to retrieve the contents of variables like tax,discount and such like things
please help.
regards dansh
Apr 12 '12 #1
1 1456
16,027 Expert Mod 8TB
See if this helps:
Passing the variables should be straightforward. You can create functions to access them and then call these functions from your applet code.
Apr 12 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by David C. Holley | last post: by
1 post views Thread by Obscurr | last post: by
3 posts views Thread by Roberto Gallo | last post: by
2 posts views Thread by David Shorthouse | last post: by
1 post views Thread by mayur_hirpara | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.