Private: MY Note


callback asp.net 2.0

Posted in ASP.NET by dev1 on the July 23, 2007

Developer Notes for prototype.js

Posted in JAVASCRIPT, prototype by dev1 on the July 23, 2007

Advance javascript link(Quick guide to somewhat advanced JavaScript)

Posted in AJAX, ASP.NET, JAVASCRIPT, JSON by dev1 on the July 23, 2007

Quick guide to somewhat advanced JavaScript http://www.sergiopereira.com/articles/advjs.html

Advance javascript link(Quick guide to somewhat advanced JavaScript)

Posted in AJAX, ASP.NET, JAVASCRIPT, JSON by dev1 on the July 23, 2007

Quick guide to somewhat advanced JavaScript

http://www.sergiopereira.com/articles/advjs.html

Advance javascript link(Quick guide to somewhat advanced JavaScript)

Posted in AJAX, ASP.NET, JAVASCRIPT, JSON by dev1 on the July 23, 2007

Quick guide to somewhat advanced JavaScript

http://www.sergiopereira.com/articles/advjs.html

extjs.com

Posted in JAVASCRIPT by dev1 on the July 21, 2007

js object.

Posted in JAVASCRIPT by dev1 on the July 21, 2007

var x = {v1:5, v2:6}
alert(x.v1); // alert(5);

อธิบาย x เป็น object (unnamed class)
มี property v1 กับ v2
ก็เลยใช้ . ในการอ้าง

ทีนี้
var x = {};
x.v3 = 6;
alert(x.v3); // ไม่ error แต่จะเ็ป็น alert(6);

เป็นการสร้าง property ขึ้นมากลางอากาศ จากนั้นจะอ้างถึงได้ตลอด

var x = {};
x.y = {};
x.y.z = function() {
 alert(’Hello World’);
}

var o = new x.y.z();

Creating a Scrollable DataGrid Web Server Control

Posted in ASP.NET, JAVASCRIPT by dev1 on the July 21, 2007

AJAX Grids, Tables

Posted in AJAX by dev1 on the July 21, 2007

Re: How to Create Digg Comment Style Sliding DIVs with Javascript and CSS

Posted in JAVASCRIPT by dev1 on the July 21, 2007

ref: http://firblitz.com/2007/3/6/re-how-to-create-digg-comment-style-sliding-divs-with-javascript-and-css

wrote a nice blog entry on how to make sliding DIVs using Javascript and CSS from scratch without having the overhead of Effects libraries such as script.aculo.us. Long story short, it made it to the front page of Digg, I thought it was cool but I think I can do better, so here it is:

Let’s start with a Javascript object:

function Slide(objId) {
this.obj = document.getElementById(objId);
this.duration = 1;
this.height = parseInt(this.obj.style.height);
return this; }

And we will want two functions to slide our element up and down:

this.up = function() {
this.curHeight = this.height;
this.newHeight = '1'; }
this.down = function() {
this.newHeight = this.height;
this.curHeight = '1'; }

And then we need a function to do the actual work:

this.slide = function() {
var frames = 30 * duration;
// Running at 30 fps
var tIncrement = (duration*1000) / frames;
tIncrement = Math.round(tIncrement);
var sIncrement = (this.curHeight-this.newHeight) / frames;
var frameSizes = new Array();
for(var i=0; i < frames; i++) {
if(i < frames/2) {
frameSizes[i] = (sIncrement * (i/frames))*4;
} else {
frameSizes[i] = (sIncrement * (1-(i/frames)))*4;
}
}
for(var i=0; i < frames; i++) {
this.curHeight = this.curHeight - frameSizes[i];
window.setTimeout("document.getElementById('"+objId+"').style.height='"
+Math.round(this.curHeight)+"px';",tIncrement * i); 	} }

(more…)

Next Page »