Highlighted

Add Rows with a Button

Avatar

Guest

21-08-2008

I'm using the helpfile example to "Create a table that grows using the button object" and when I get to point about adding script to the button object's click event, I select JavaScript as the language and add:



Table.Row1.instanceManager.addInstance(1);



But when I exit out of that, the Click event now reads "Click*" and the script also shows up in the FormCalc field. Deleting it from the FormCalc field also deletes it from the JavaScript field.



I have no clue what I'm doing wrong, so feel free to beat me over the head with something obvious.



Thanks,



Smitty

Replies

Highlighted

pguerett

22-08-2008

I am not sure what you mean ....but to add script to an object, make sure that the object has focus and then in the script editor choose the event that you want the code to run on. Then choose the language that you want to use. Now add your code.
Highlighted

Avatar

Guest

22-08-2008

Thanks Paul,



My button has focus, then I add the code: Table1.Row1.instanceManager.addInstance(1); in the JavaScript language bar for the click event, but still no joy when I try it in Preview.



Once I add it the code also appears when FormCalc is selected and "Click" has an asterix appended to it: "Click*"



Asiye,



I have forwarded you a copy.



Thanks to you both,



Smitty