I am attempting to use javascript to hide/show items when I button is pressed. If the items are set to visible in the design view the script to hide/show works fine, but if I set the presence property to invisible or hidden from design view, the script will not override that and make the items visible. Has anyone come across this before? Below is a copy of the script I've been using.
I have tried both Hidden and Invisible from design view and both cause the script not to function. If the presence is set to visible from the design view both "hidden" and "invisible" work fine in the script.
Both hidden and invisible are valid values. Invisible will leave the object on the form (just make it invisible to the user). Hidden will remove it from th elayout so no reference to the object is available.
I think your issue is that you are not displaying the form as a dynamic form. If you are using Preview to test the form, go under File/Form Properties and click on the preview tab. Make suer the form is set as an Interactive form and the Preview Adobe XML Form as is set to Dynamic XML Form
Thanks for the suggestions, still no luck though, I am trying to use the feature to swap two subforms on a page so that when a button is pressed one subform becomes hidden and the other form becomes visible. I have verified that the form is saved as a dynamic form.
Sorry, poor typing on my part. I think i figured it out though, i had the button to switch forms on one of the subforms. When i moved the button off the subform and on to the main form it seems to be working now.