By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,567 Members | 1,522 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,567 IT Pros & Developers. It's quick & easy.

how to pass JavaScript function and its variables to an applet

P: 1
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
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
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.