473,508 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to pass JavaScript function and its variables to an applet

1 New Member
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. {
  3.  
  4. subtotalElem=document.getElementById("total");
  5.  
  6.  
  7. var taxElem=document.getElementById("tax");
  8.  
  9. productElem=document.getElementById("product-name");
  10.  
  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 1575
acoder
16,027 Recognized Expert Moderator MVP
See if this helps:
http://www.rgagnon.com/javadetails/java-0172.html
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

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

Similar topics

5
2342
by: David C. Holley | last post by:
How would I run a JavaScript function in a *.asp page and then pass the value returned to VBScript for further processing? ***Converting the function to VBScript is *NOT* an option.
4
8054
by: timwap | last post by:
I hava a Java Applet that produces a DTMF tone at a certain time of day. There are 4 parameters to the Applet, they are hour = Hour of triggered event 00~23 min = minute of triggered event 00~59...
1
11656
by: Obscurr | last post by:
i've got an array created in php that I want to send over to a javascript function. onclick = "return sjekk(<?echo $names; ?> )" in my "sjekk" function, when I try to print an alert : ...
3
1675
by: Roberto Gallo | last post by:
Hi everyone; * How can I actively call a Javascript function from inside a Applet? * What would be a good messaging system among some Applets inside the same page? Thank you very much....
1
1823
by: SPG | last post by:
Hi, We have an applet that has to support the SUN VMs as well as the MS VM. The applet receives updates from a server (via tcp or http) and wraps them up as objects and passes them using the...
2
12313
by: David Shorthouse | last post by:
Folks, I have a drop-down select menu generated server-side. I was hoping to pass more than a single variable from the option value to a javascript function. Is this possible? At the moment, my...
1
13148
by: mayur_hirpara | last post by:
Hi, I am looking to call a javascript function using variable number of parameters. Suppose I have a function foo(param) { ..... } I want it to be called unpredictebly when certain action...
3
3370
by: Steve Kershaw | last post by:
Hi, I need to pass a value from a hidden input: <input id="hiddentxtWidth" type="hidden" value="1065" /> to a JavaScript function. I've tried the following: <script type="text/javascript" >...
2
1575
by: kid | last post by:
Hi i need help i want to pass javascript variable to php. here's my sample code its not working. please someone help me.... <select name='dbPages' OnChange='getLayoutID(this.value)'> <option...
7
10637
by: btreddy | last post by:
Hii all , desperately looking for help. i want to execute one java script function,passvalues(), which is there in my master page. After doing so much of additions , subtraction and type...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7115
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1547
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
414
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.