Is it possible to turn on/off the scroll, caps, and num locks on a user's computer using javascript? It's somewhat hard to explain what I need this for, but if there is a way for this to be done, please let me know...
I was wondering if the was any way to determine the state of the caps lock key, on or off. Of course I can capture the key events and see whether the caps lock is pressed, but that does not help.
I have seen some example that looks at the characters entered in an input field to determine if the caps lock is on, but I was wondering if something is possible that is a bit more immediate to report the caps lock state.
I am using one script which is functioning properly incase of IE but incase of Mozilla evenif the shift key is pressed and any character key is pressed then it is displaying Caps Lock is On. how can I make it Mozilla and IE compatible.
I am using a directory program that won't allow commas in my fields. I am unable to escape them, so I'd like to add them in the browser with a find and replace with javascript.
If sort this work: var myarray= new Array(10,16,35,"0.1",8,4,22,19,1,22,35,9,26,38,40);
with code function function1(a,b) {return a - b} var order02=new Array(); order02=myarray.sort(function1);
but instead of 0.1 I use 0,1 (with comma) not work;
Is possible to solve?
Further, in the function for to sort, what is the difference between this function function1(a,b) {return a - b} and this function function2(a, b) { if (a b) { return 1; } if (a == b) { return 0; } if (a < b) { return -1; } }
If I use 0.1 they work good both; If I use 0,1 (with comma)
they work dissimilar (different result) and both whatever not work.
I need a regular expression that will validate a double quote comma delimited list where the odd entries are numeric and the even are alphabetical. Each pair must also be on a separate line. For example:
"1","Peter" "2","Paul" "3","Mary"
I've used the following expression to validate comma delimited lists, but without the double quotes, numeric/alpha pairing and line return restriction.
I'm working this script below that successfully selects and removes certain anchors that contain this text "d2". There are actually numerous anchors in this TD (not div) container with different (labels for the site) text strings, each anchor is followed by a comma with a space.
So I'm removing the anchors no problem (thx to jQ) - but I still need help to remove the trailing comma and associated space after each anchor I remove. My attempts at this solution are so horribly naive I won't bother posting one.
its possible to limit variables example I have a variable called myCurrency containing 3.454 well sort of pass it to a function that makes it become 3.45 though if the third number is higher than 5 it rounds it.
I have one text box , it can have values like 1 or 1,2 or 1,225,345,21 ie multiple values so ......But now i want textbox should validate weather values entered by user are proper
toString().match(/^(([0-9](,)?)*)+$/)
This is code i'm using its validating correct only ,but one problem when user enter values like this inputval:1,22,34,25,645,
the last comma is not validating it should through error
I have a array called 'data' which is used globally as it is being used in other functions. Each data[i] has array of values like data[i]= "United States,Tennessee,Anderson"; I was trying this in javascript:
data=new Array(); function display(){ //window.open(_blank,'myWindow'); document.write("<table border='1'>"); for(var i=0;i<data.length;i++)
The commas in the (Hello,World:,check1,check2,and,check3') part of the code are inserting a space between the words. But I also want to insert comma between check1, check2, and check3. I have tried the html ascii code for comma that is ",". I also tried the escape sign (as below. None of these codes worked. Does anyone have any tips?
I cannot get anything to validate a comma delimited list of stock symbols, like "IBM, MSFT,INTC). symbols are alphanumeric with a maxium length of 5. I want to block multiple, adjacent commas, and allow up to two blank spaces between symbols.
I have a gridview that displays client data. The first column on each row for the gridview is a checkbox. The second column on the gridview is client name and the third column is account holder. The user can select checkboxes (on multiple rows) to modify data (account holder).
I want to add clientName column value in a comma delimited string to a hiddenfield on my page. How do I do that using javascript, as I do not want to use postback and looping through each row on the grid to get the checkbox status. When a checkbox is checked, it should append the hiddenfield value.
I am getting the hiddenfield value as blank no matter what checkboxes are checked. I also know that my code is not targeting the correct row to get ClientName (row where checkbox is checked).
function RowClick(CheckBox) { var BaseControl = document.getElementById('<%= this.myGrid.ClientID %>'); var TargetControl = document.getElementById('MyHiddenField');
I have a asp.net gridview that displays client data. The first column on each row of the gridview is a checkbox. The second column on the gridview is client name and the third column is account holder. The user can select checkboxes (on multiple rows) to modify data (account holder).
I want to add clientName column value in a comma delimited string to a hiddenfield on my page.How do I do that using javascript, as I do not want to use postback and looping through each row on the grid to get the checkbox status. When a checkbox is checked, it should append the hiddenfield value.
I am a newb on javascript. Please review my javascript code and suggest corrections. I am getting the hiddenfield value as blank, no matter what checkboxes are checked. I also know that my code is not targeting the correct row to get ClientName (row where checkbox is checked).[code]...
what is the regular expression for a comma-separated list (in this case - IPs) ?My list looks like this: 192.168.0.1, 10.%.23.100, %.46.%.1So far I managed to create this:^[0-9%]{1,3}.[0-9%]{1,3}.[0-9%]{1,3}.[0-9%]{1,3}$But I don't know how to specify a comma-separated list of the above sequence.
validation ' <strong>Email Validation for multiple emails (comma separated)</strong> ' for textarea. I am writing Regular expression but not able validating the given input with comma