Quantcast
Channel: Adobe Community : Unanswered Discussions - Acrobat
Viewing all articles
Browse latest Browse all 73766

Reset button not working on resetting javascript added to button?

$
0
0

I set up a form button using the javascript below, to format the button to go from 0-1-2-3-0 with each click...

 

This form also has a reset button, but if I have the button sitting on a 3 and hit the reset button it leaves it at a 3, does not reset.

 

Is there a way I can set the button field to reset at the 0, or even just a blank or "-" for default?

(having the default as a blank would be the best option for me - then I wouldn't even need the 0 option)

 

// mouse up action script to increment button caption count;;

var nLimit = 4; // maximum limit plus 1 for caption number;

var nCaption = Number(event.target.buttonGetCaption()); // get button caption number;

nCaption++; // increment caption;

nCaption = nCaption % nLimit; // modulo nLimit or 0 - nLimit - 1;

event.target.buttonSetCaption(nCaption); // set caption count;

// end mouse up action;


Viewing all articles
Browse latest Browse all 73766

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>