Showing posts with label HTML and JS. Show all posts
Showing posts with label HTML and JS. Show all posts
-Client Side Image Resizing (Chrome, Firefox not IE10)
-Calculation of Rectangle Overlap / Intersection area
-Calling JavaScript Function Asynchronously
-Check charCodeAt with Javascript
-JavaScript substring() AND substr()
-Javasript Trim leading trailing
-Javascript Check Chinese/English
-Allow only numbers/digits in TextBox
-Sleep or Pause
-Window Opener
-Javascript - window.open() Syntax Generator
-Set Checkbox Value with JS
-Read Only, Max Length in JS
-Repeat/Clone Div in HTML
-jQuery UI
-Escape HTML
Wednesday, June 4, 2014
Wednesday, April 23, 2014
Wednesday, June 9, 2010
Tuesday, April 13, 2010
Monday, April 12, 2010
JavaScript substring() AND substr()
stringObjectToTakeAPartOf.substring(start-index,stop-index)
- start-index: (Required - Numeric Value) - where to start the extraction
- stop-index: (Optional - Numeric Value) - where to stop the extraction
- start-index: (Required - Numeric Value) - where to start the extraction
- length: (Optional - Numeric Value) - how many characters to extract
Thursday, April 1, 2010
Monday, March 15, 2010
Allow only numbers/digits in TextBox
<HTML>
<HEAD>
<SCRIPT language=Javascript>
<!--
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<INPUT id="txtChar" onkeypress="return isNumberKey(event)" type="text" name="txtChar">
</BODY>
</HTML>
Tuesday, March 9, 2010
Thursday, March 4, 2010
Monday, March 1, 2010
Set Checkbox Value with JS
// reset whole checkbox value to true/false
function SetValues(Form, CheckBox, Value){
var objCheckBoxes = document.forms[Form].elements[CheckBox];
var countCheckBoxes = objCheckBoxes.length;
for(var i = 0; i < countCheckBoxes; i++){
objCheckBoxes[i].checked = Value;
objCheckBoxes[i].value = Value;
}
}
Monday, February 22, 2010
Repeat/Clone Div in HTML
<div id="footerpaging">
</div>
<script>
document.getElementById("footerpaging").innerHTML =
document.getElementById("paging").innerHTML;
</script>
Sunday, February 21, 2010
Subscribe to:
Posts (Atom)