Click here to Skip to main content
15,891,184 members
Home / Discussions / JavaScript
   

JavaScript

 
Questionadapt datatable jquery to jee application Pin
ahmadiss4-Aug-12 23:34
ahmadiss4-Aug-12 23:34 
AnswerRe: adapt datatable jquery to jee application Pin
Richard MacCutchan5-Aug-12 1:24
mveRichard MacCutchan5-Aug-12 1:24 
Questionshowmodaldialog return value undefined across domain Pin
Amr M. K.4-Aug-12 23:24
Amr M. K.4-Aug-12 23:24 
AnswerRe: showmodaldialog return value undefined across domain Pin
jkirkerx5-Aug-12 11:05
professionaljkirkerx5-Aug-12 11:05 
GeneralRe: showmodaldialog return value undefined across domain Pin
Amr M. K.6-Aug-12 22:05
Amr M. K.6-Aug-12 22:05 
AnswerRe: showmodaldialog return value undefined across domain Pin
BobJanova5-Aug-12 23:43
BobJanova5-Aug-12 23:43 
GeneralRe: showmodaldialog return value undefined across domain Pin
Amr M. K.6-Aug-12 21:26
Amr M. K.6-Aug-12 21:26 
QuestionEvalulating and passing RGB values from keydown Pin
jkirkerx2-Aug-12 8:12
professionaljkirkerx2-Aug-12 8:12 
I'm working on a color picker, to alter the canvas color of images uploaded.

So I have a manual RGB input, 3 textboxes

I wrote a program to evaulate the keydown, and can capture BS, DEL 0-9, but I also need to check that the whole number is 0-255.

I'd like to do it in one shot, but I'm not sure if it's possible, and where to implement it.

Just looking for suggestions.

$('[id*="_txt_Red"]').keydown(function (e) {
  return evaulateKeyDown_RGB(e);
});

function evaulateKeyDown_RGB(e) {

    // Delete = 46 | BS = 8 | 0 = 48 | 9 = 57 | < = 37 | > = 39
    // Delete = 46 | BS = 8 | 0 = 96 | 9 = 105 | < = 37 | > = 39 
    var charCode = e.keyCode || e.which;
    //alert(charCode);
    
    // Normal Keyboard
    if (charCode == 8 || charCode == 37 || charCode == 39 || charCode == 46 || ( charCode >= 48 && charCode <= 57 )) {
        return true;
    }
    // Numeric Keypad    
    else if (charCode >= 96 && charCode <= 105) {
        return true;
    }
    else {
        return false;
    }
}

AnswerRe: Evalulating and passing RGB values from keydown Pin
enhzflep2-Aug-12 9:58
enhzflep2-Aug-12 9:58 
GeneralRe: Evalulating and passing RGB values from keydown Pin
jkirkerx2-Aug-12 11:54
professionaljkirkerx2-Aug-12 11:54 
AnswerRe: Evalulating and passing RGB values from keydown Pin
BobJanova5-Aug-12 23:31
BobJanova5-Aug-12 23:31 
GeneralRe: Evalulating and passing RGB values from keydown Pin
jkirkerx6-Aug-12 7:22
professionaljkirkerx6-Aug-12 7:22 
GeneralRe: Evalulating and passing RGB values from keydown Pin
BobJanova7-Aug-12 0:11
BobJanova7-Aug-12 0:11 
GeneralInstalling Pygame Pin
johtnkucz30-Jul-12 4:36
johtnkucz30-Jul-12 4:36 
GeneralRe: Installing Pygame Pin
johtnkucz30-Jul-12 4:45
johtnkucz30-Jul-12 4:45 
QuestionRe: Installing Pygame Pin
Richard MacCutchan30-Jul-12 6:14
mveRichard MacCutchan30-Jul-12 6:14 
AnswerRe: Installing Pygame Pin
Sandeep Mewara31-Jul-12 8:56
mveSandeep Mewara31-Jul-12 8:56 
GeneralRe: Installing Pygame Pin
Richard MacCutchan31-Jul-12 22:32
mveRichard MacCutchan31-Jul-12 22:32 
QuestionAnalysing an obfuscated malware script Pin
Bernhard Hiller29-Jul-12 21:48
Bernhard Hiller29-Jul-12 21:48 
AnswerRe: Analysing an obfuscated malware script Pin
Richard MacCutchan29-Jul-12 22:00
mveRichard MacCutchan29-Jul-12 22:00 
GeneralRe: Analysing an obfuscated malware script PinPopular
enhzflep30-Jul-12 1:43
enhzflep30-Jul-12 1:43 
GeneralRe: Analysing an obfuscated malware script Pin
Bernhard Hiller30-Jul-12 4:48
Bernhard Hiller30-Jul-12 4:48 
GeneralRe: Analysing an obfuscated malware script Pin
enhzflep30-Jul-12 23:41
enhzflep30-Jul-12 23:41 
GeneralRe: Analysing an obfuscated malware script Pin
Bernhard Hiller31-Jul-12 2:26
Bernhard Hiller31-Jul-12 2:26 
GeneralRe: Analysing an obfuscated malware script [edit] Pin
Lutosław1-Jun-13 4:10
Lutosław1-Jun-13 4:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.