Showing posts with label HTML and JS. Show all posts
Showing posts with label HTML and JS. Show all posts
List of 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

Client Side Image Resizing (Chrome, Firefox not IE10)

http://webreflection.blogspot.hk/2010/12/100-client-side-image-resizing.html

Wednesday, April 23, 2014

Calculation of Rectangle Overlap / Intersection area

http://jsfiddle.net/uthyZ/

Wednesday, June 9, 2010

Calling JavaScript Function Asynchronously

Asyn.html




Callback.html







Tuesday, April 13, 2010

Check charCodeAt with Javascript





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
stringObjectToTakeAPartOf.substr(start-index,length)
  • start-index: (Required - Numeric Value) - where to start the extraction
  • length: (Optional - Numeric Value) - how many characters to extract

Thursday, April 1, 2010

Javasript Trim leading trailing

Javascript Check Chinese/English



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

Sleep or Pause



Window Opener

Main.jsp




Popup.jsp


Thursday, March 4, 2010

Javascript - window.open() Syntax Generator

http://weblog.gilbert.tw/public/scripts/js_windowopen.html

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;
}
}

Read Only, Max Length in JS

Set Read Only for Textbox


Set Max Length for Textbox

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

jQuery UI

http://jqueryui.com/download

Escape HTML

> = &gt;
< = &lt;
space = &nbsp;
& = &amp;