Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 7th, 2008, 10:59 AM
Registered User
 
Join Date: Apr 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to JasonF430
Default TextUtil and EventUtil

I'm reading <<Profession javascript for web developers>>.

I have seen for a Script contain "TextUtil" class and "EventUtil" class, but I dont know where are they from?

code fragment:

Code:
TextUtil.allowChars = function(objTextbox, objEvent, blnBloackPaste){
    objEvent = EventUtil.formatEvent(objEvent);

    var strValidChars = objTextbox.getAttribute("validchars");
    var strChar = String.fromCharCode(objEvent.charCode);

    var blnIsValidChar = strValidChars.indexOf(strChar) > -1;

    if(blnBloackPaste){
        return blnIsValidChar && !(objEvent.ctrlKey && strChar == "v");
    }
    else{
        return blnIsValidChar || objEvent.ctrlKey;
    }
}


Similar Threads
Thread Thread Starter Forum Replies Last Post
EventUtil class not working in web server KelRegor BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 2 December 26th, 2007 09:50 AM
SOLVED: How to recover element with eventutil.js javata BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 1 October 5th, 2006 03:50 AM
making EventUtil a class bradrice BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 2 August 29th, 2006 11:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.