I have a dropdown which changes which on change displays a different image. While it does work as expected, I do not want any of the images to be visible until you've chosen from the drop down.
Problem is that if I make the images invisible (using presence) to start, they never display again. I've tried setting them to invisible both through the field tab and also in the script editor.
Anyone have any ideas?
Solved! Go to Solution.
Views
Replies
Total Likes
Rather than set it to invisible in the first place, how about leaving it visible with a picture in it that matches the form background to start?
Views
Replies
Total Likes
Are you setting the field back to visible when the user exits the drop down?
Views
Replies
Total Likes
Rather than set it to invisible in the first place, how about leaving it visible with a picture in it that matches the form background to start?
Views
Replies
Total Likes
Hi,
If you are using image objects you could put script in the dropdown's docReady event:
image1.presence = "hidden";
image2.presence = "hidden";
...
If you are using imageFields, then you can put similar script in each of the imageFields' docReady event:
this.presence = "hidden";
On the change event of the dropdown I presume you are using the newText value and changing the presence to "visible".
Hope that helps,
Niall
Views
Replies
Total Likes
That's pretty much what I was doing, the problem being that if 'presence' were set on anything like a form:ready, docReady etc... it would hide fine, but would never reappear when you selected it in the dropdown.
It would however come back if I made it invisible on something like a click event.
Appears there's some kinda timing issue with when you can hide an object and still be able to manipulate it later.
Views
Replies
Total Likes
Thanks. Yeah so the solution was to create another image field fill it with a white gif and place it overtop of the other images.
Then in the onchange event of the dropdown i set: whitecover.presence = "invisible";
Views
Replies
Total Likes
Hi,
Haven't seen that before. Normally the docReady event is good, because you are guaranteed that it will fire only once when the form opens. Are the images on the master page?
There must be something else going on; because the .presence method normally works without a hiccup. Try opening the java console in Acrobat (Control+J) and open the form and change the dropdown, to see if any errors are showing up.
Good luck,
Niall
Views
Replies
Total Likes
Didn't see any errors. Have attached a test file showing the problem.
If you remove this.pressence = "invisible" from the imagefield docReady event, the toggle works.
Views
Replies
Total Likes
Hi,
The main problem is that the form was saved as static. It needs to be saved as dynamic for hiding and showing objects. In the orinigal form the toggle wasn't completely hiding the object as the caption was still visible.
Nice photo ;-)
Give this a try,
Niall
Thanks Niall, works like a charm
It is a damn cute photo
Views
Replies
Total Likes
Views
Likes
Replies