6 Replies Latest reply on Sep 5, 2015 4:40 AM by JR_Boulay

    Is there a way to show/hide an image (or layer) using javascript?


      I'm creating a form where when someone checks a checkbox, a giant X comes up over what I want it to hide - it works fine the way it is. However, I would prefer to (instead of having a giant X, which right now is just a Read Only text field) have a slightly transparent image cover what I need covered (the point is that I want the end user to be able to still see what is no longer able to be used, but for it to be obvious that it's not accessible while the checkbox is checked).


      My current javascript is this:


      var encountercheckbox = "encountercheckbox.6"

      var encountercover = "encountercover.6"



      if(this.getField(encountercheckbox).value == "Off" )

      {this.getField(encountercover).display = display.hidden;


      this.getField(encountercover).display = display.visible;




      I think doing this transparent image show/hide might be the way to do it, but I'm not opposed to using Stamps or just a straight up image if it's do-able.. I'm just not sure.


      Thank you in advance!