What you could do it put your JavaScript code in between <div> tags:
<div id = "invisibleText" style= "position:absolute; top:270; left:10; z-index:2"> JavaScript goes here </div>
then your java code also in between <div> tags:
<div id = "invisibleText" style= "position:absolute; top:270; left:10; z-index:1"><applet name = "something.class"></applet>
</div>
The javaScript will be on top because it has a higher z-index (2)/
Good Luck!
Angie
Quote:
|
Originally Posted by victorace
Hi there!
I am a complete beginner in JavaScript. I am a Visual FoxPro programmer who is trying to set an existing application on the net.
My problem is that I cannot find a way to use macro substitutions with JavaScript. I have searched everywhere but found nothing 'til now.
Here is an example of what I am trying to do.
If other languages I can just do the following in order to calculate the totals for a given set of controls (assuming there is a form full of controls named TEXT1, TEXT2, TEXT3, etc.:
lnTotal = 0
FOR i = 5 TO 20
lcControl = 'Text' + STR(i)
lnTotal = lnTotal + VAL(Form.&lcControl..value)
NEXT
This way I can just get the total for controls 5 to 20.
Does anyone know what is the way to do the same in JavaScript? I mean, referencing a control by macro substitution(Form.&lcControl)???
I would greatly appreciate any help.
Thanks in advance!
|