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

Javascript Code Issue

$
0
0

My goal: To get the user to complete the field before being able to move onto the next field.

 

My Javascript Code: OnBlur

 

f = getField(event.target.name)

if (f.value.length == 0)

   {   

   f.setFocus()   

   //Optional Message - Comment out the next line to remove

   app.alert("This field is required. Please enter a value.")

   }

 

What happens:

  1. When the user tabs out of that field without completing it, the error message pops up. That is fine.
  2. However, the message gets stuck and user cannot bypass it by clicking "okay." If you click "okay" the dialog box stays up indefinitely.

 

 

My question:

How can I alter the code, or change the action option to give the user the option to fix or complete the field after clicking "okay" to bypass the error?


Viewing all articles
Browse latest Browse all 73766

Trending Articles



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