JavaScript
Page Redirection
Dec 16th
เมื่อวันก่อนมีน้องมาถามเกี่ยวกับเรื่อง Page Redirection ก็เลยคิดว่าจะเอามาเป็นพูดถึงเสียหน่อย
การ redirect หน้าเว็บ คือการส่งหน้าเว็บที่เปิดอยู่ปัจจุบันไปยังหน้าอื่น สามารถทำได้ 3 ระดับดังนี้
- ระดับ HTTP Header
- ระดับ HTML Header
- ระดับ Script
Javascript GetElementsByClass
Jan 27th
today, i have any reason to search HTML element by class name but javascript is not have support function. so i found somethings in the internet but not as good as i need. but i can modify it as i want. so it’s be like this.
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ”); };Document.prototype.getElementsByClass = function( searchClass, tagName) {if (tagName == null) tagName = ‘*’;var el = new Array();var tags = this.getElementsByTagName(tagName);var tcl = ” “+searchClass.trim()+” “;for(i=0,j=0; ivar test = ” ” + tags[i].className + ” “;if (test.indexOf(tcl) != -1)el[j++] = tags[i];}return el;};
Dojo Toolkit
Feb 15th
When I try to learn more about Dojo Toolkit. I found some problem of its script. such as uncompatible of javascript and css style sheet. And on downloaded demo, It have too many debug message. No downloadable manual or document. (It have just wiki for manual.)
But its script is too excellence and so exciting with easy way. just like ‘taglib’ in Java. (Or another language)
today I waste too much time to find and read manual. But you can found sample in demo section.
Dynamic HTML tips
Feb 14th
Hello it’s valentine again, Last 4 valentine ago. I used to have new web diary. 4 years later I have new one. “Dynamic HTML tips” is it.
It talk about HTML, Javascript and CSS Style Sheet tips. That may help newbie to create his/her own website with text editor. (I think manually coding HTML code is more beautiful.)
dojo – the javascript toolkit
Feb 6th
Ummm too many times ago. I try to write and javascript by myself. today my boss said “Why dont you try dojo toolkit for you ajax or javascript?”
I ask him for dojo like “what dojo is?” or “how its better than specific javascript?” because i think “Ajax is so easy and javascript i’m not newbie”
The first time of its demo. It attack my ego. Its great tool that provide beautiful web object, ajax and another. I don’t know how can it work. Or how difficult is it for specific perpose.
but I know one, Its demo is too excellence.
