Archive for 12月, 2007
The Void
Posted by essoduke - 12月 20, 2007 at 09:12:16 am - 84 User Views
I close my eyes
And nothing’s there.
Open once and open twice
Still I see the emptiness.
I wish it would go away
Be filled by something
But nothing fills the void.
An emptiness, a hole
My eyes are closed,
My dreams are gone
Once opened still I see
Nothing there for me.
The world, it still continues
But the void it grows and grows.
Others still have their dreams
But mine were taken from me
Swallowed by the void
過客
Posted by essoduke - 12月 20, 2007 at 01:12:12 am - 64 User Views
恰如林邊吹笛的過客,
樹影無聲的伴奏。
黑夜脫去它的罩衫,
可月光遮掩著不敢現身。
緊閉的門扉沒有動靜,
但燭光映著人影從紙窗中透出。
沒有人應門,
也沒有人敲門。
再想吹笛的時候,
才發現笛子早就發不出聲音了。
又或者,他從來不能發出什麼聲音。
沒有說話,
只有燭火還燃著。
#Cloudsan@ptt
Create optgroup element into select list with DOM
Posted by essoduke - 12月 20, 2007 at 12:12:09 am - 209 User Views今天在研究使用 Ajax 透過 jQuery 動態建立 Optgroup 清單。
混沌兩個月,終於寫出稍微有用的文章了…
- var obj = document.getElementById("list");
- $.getJSON("ajax.asp", {id: idx}, function(json){
- // if json data created...
- if(json.length > 0) {
- // get json data of optgroup
- for(var i=0; i<json .length; i++) {
- var oGroup = document.createElement("optgroup");
- // setting label attribute
- oGroup.label = json[i].title;
- // insert optgroup element to select list
- obj.appendChild(oGroup);
- // get json data of option
- for(var j=0; j<json[i].product.length; j++) {
- oOption = document.createElement("option");
- //setting title attribute
- oOption.label = "Option1";
- //setting value attribute
- oOption.value = "Value of Option1";
- //insert option element to select list
- obj.appendChild(oOption);
- }
- }
- }
- });
JSON Data Example
- [
- {
- title:'optgroup1',
- product:[
- {
- id:1,
- title:'Demo1',
- price:100
- },
- {
- id:2,
- title:'Demo2',
- price:200
- }
- ]
- },
- {
- title:'optgroup2',
- product:{
- id:3,
- title:'Demo3',
- price:300
- }
- }
- ]
Reference
Technorati Tags: DOM, javascript, jQuery
Lies
Posted by essoduke - 12月 19, 2007 at 06:12:13 am - 260 User Views
Whatever, I don’t care anymore.
不回頭的話,究竟能走多遠呢?
Posted by essoduke - 12月 19, 2007 at 12:12:19 am - 75 User Views
從小到大,沒幹過什麼偉大的事
或許該有個轉變、給自己一個期許
讓七零八落的人生,至少能有一個些微完整的角落
2008 年將至,讓今年劃下完美的句點。
Powered by WordPress with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds.
Valid XHTML and CSS.





