Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Little modification for TCPaint function
bizon-k
Newbie

Posts: 1
Registered: 4/4/2005
Location: Russia
Member Is Offline
posted on 4/4/2005 at 11:55 AM Reply With Quote
Little modification for TCPaint function


Sorry for my English :-(

If you are choosing color (for example #33CCCC) and then modifying it to incorrect value in input field (for example #33JJKK or #rrrrrrr or 237654235) in attempt to open palette window once again you have a JS error in result.

To fix this "bug" ;-) i suggest the little modification of TCPaint function code:

function TCPaint(c, b_noPref) {
c = (b_noPref ? '' : '#') + c.toUpperCase();

// check correct color value with RegExp method
var ptrn = /^#[a-f0-9]{6}$/i;
if (!ptrn.test(c))
c = '#FFFFFF';
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
 Product Demonstrations Live Demo
Free Download Free Download
Product Documentation Documentation
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004