Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - JavaScript "K" Event
  FAQ FAQ  Forum Search   Register Register  Login Login

JavaScript "K" Event

 Post Reply Post Reply
Author
Message
JohnT View Drop Down
Team Player
Team Player


Joined: 23 Oct 13
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote JohnT Quote  Post ReplyReply Direct Link To This Post Topic: JavaScript "K" Event
    Posted: 23 Dec 13 at 2:58PM
I'm trying to determine if my JavaScript is the problem or the "K" event for the FormFieldJavaScriptAction works differently than expected. My understanding is that the form field "K" event should fire after any keystrokes.

Given the code below, the event does not fire on the initial non-numeric keystroke. After that point it fires. Obviously, the intended behavior is to have this event fire right after ANY non-numeric key is pressed.

Thanks,
John 

DPL.AddGlobalJavaScript('JTJava2', 'function numcheck(){parseInt(event.value); if ((isNaN(event.value) || event.value <= 0) && event.value != "") {app.alert("Please enter only numbers",3,0,"Number Check"); event.value = "";}}');
...

DPL.FormFieldJavaScriptAction(QTYFld, 'K','numcheck()');
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store