Home
Greetings guest! members can rogu in here.
(hide this)
 
Danny's News (toggle comments)
Otaku and Japan news (subscribe) or (see more »)
Portal Userbility
Thanks for your previous feedback on the top page design. As you can see I've brought back the orange ^^ Mu... ( more » )
Sat 07/26 21:26 comments (35)
Japanese Trains
You get on a train in Japan one day and see this. The doors close behind you. What do you do? Via Neta. ( more » )
Sat 07/26 12:59 comments (115)
WC Gundam
Somebody just raeped Gundam by making a toilet shaped mobile suit... Via Neta. Whats the worst Gundam design... ( more » )
Sat 07/26 07:00 comments (47)
Sun Seto
Never got round to really watching the anime but do like this figure by Orchid Seed. This 1/7 scale figure of... ( more » )
Fri 07/25 23:16 comments (31)
Human Mage
Another one we've spoken about but the better pics are up at GoodSmile and Hobby Stock. Dont know much about ... ( more » )
Fri 07/25 20:44 comments (27)
Shakugan no Shana
Spoke about this earlier but decent pics are now up at GoodSmile and Hobby Stock. I remember when the Nendoro... ( more » )
Fri 07/25 20:36 comments (51)
日本語/Japanese  Mon 07/31 21:16 JST
When I introduced the polls to the site, I only knew of one method to do it and that was to use iFrames but I am glad to say that I've finally been able to do the polls using Ajax - but not without *many* sleepless nights...
So that you dont have to go through the same pain and agony, here are a few pointers.

The main problem I was having was that I was using one object to process each poll - up to four polls on each page. As the page loaded, the object that makes the XMLHttpRequest was being called. The response were then to be fed into divs where the polls were to appear. The problem was that the object was not handling simultaneous multiple requests properly and sometimes responses would not feed into their appropriate divs - but sometimes they would.

I tried things like using setTimeout() to set a time delay after each request and also tried feeding all the requests through an array so that each XMLHttpRequest would be made one at a time with no luck at all.

I was about to take a dive out the window when I discovered the existence of two libraries that would help me process multiple requests.
Prototype and Rico are the libraries that saved me and helped me realize how multiple requests should be handled. Rico is dependent on prototype so you need to include both of them.

function update(){
ajaxEngine.registerRequest("multiple","/UrlOfScript");
ajaxEngine.registerAjaxElement("div567");
ajaxEngine.registerAjaxElement("div563");
ajaxEngine.sendRequest("multiple","");
}
window.onload=function(){
update();
}

ajaxEngine is a variable that refers to the Rico.AjaxEngine object and is available in rico.js. What the ajaxEngine.registerAjaxElement is doing is registering the divs that need to be populated when the responses are returned. the UrlOfScript is the location of the server side script that will process and return results - I stick variables on the end like UrlOfScript.php?poll[title]=do+you+love+gundam...

What you have to do is to get UrlOfScript.php to return the response in XML format...

<? header("Content-Type: application/xml"); ?>
<ajax-response>
<response type="element" id="div567">
<![CDATA[Returned HTML goes here
]]>
</response>
<response type="element" id="div563">
<![CDATA[Returned HTML goes here
]]>
</response>
</ajax-response>

As you can see I just use CDATA and dump my html in there. if you are using php, you can use ob_start(), ob_get_contents() and ob_end_clean() to help you generate the XML response.

I've done QA in FF, and Safari on a Mac and FF, IE6 on Windows and everything seems to work fine - do let me know if you spot problems.

By the way - if you are wondering what the image has to do with this post then the answer is absolutely nothing - I thought it was cute and would keep you awake during this post. Its for a game called "ef" coming out this year...
Polls
Edward in Michigan
Hmm...

Man, I still have a lot to learn.

Study study study...
(ID #38412) Posted on 2007/01/02 01:23
Leo in San francisco
Seems to work fine in Opera on Linux. I've been playing around with the librabries from script.aculo.us
(ID #38415) Posted on 2007/01/02 01:23
luke in virginia
thank god i've got a web development course this semester; it'll be a good refresher on javascript and a really good refresher on php
(ID #38416) Posted on 2007/01/02 01:23
Phenie in South Africa
Well... I liked the picture on the top....

The rest... well... I liked the picture ALOT!

:P
(ID #38417) Posted on 2007/01/02 01:23
[ Ash ] in Singapore
I'd definitely like to learn to Code. The Picture above I like definitely.
(ID #38419) Posted on 2007/01/02 01:23
Arekusu in The lost woods
Hmm, currently i don't know how to code, but when my bro gets back from his hols, hes gonna teach me the basics, and im gonna be making my own flashy website XD
(ID #38420) Posted on 2007/01/02 01:23
Kazuki in the land of 'Oz'
Hey man, I just discovered this site of yours (with those hilariously wholesome Trooper series of pics) and have to say, keep up the awesome work.  That Strike PG kit looks awesome btw.   

Since you're in Tokyo, were you out to see the fireworks in Sumida-ku the other day?
(ID #38423) Posted on 2007/01/02 01:23
Danny Choo in Tokyo
Didnt manage to go to the sumida fireworks as I was still down with a cold. Not sure I would have enjoyed it without getting those special seats as it does get very crowded at these venues.
(ID #38426) Posted on 2007/01/02 01:23
nodle in America
Nice picture at the top Danny!
(ID #38427) Posted on 2007/01/02 01:23
Lately, I'm a Perl coder more than anything else. I should start playibg around with AJAX....
(ID #38428) Posted on 2007/01/02 01:23
ninjascience in I'll never go back to Geo...
one commentor mentioned script.aculo.us , which also uses prototype.  I love it.

new Ajax.Updater('someDivId', 'index.php?do=getsomething');

it's that easy to return some html via Ajax and insert it into some container.  Also, be sure to check out the prototype docs at http://script.aculo.us.  There's a ton of life saving functions in there, like $(someDivId) instead of document.getElementById(someDivId)
(ID #38432) Posted on 2007/01/02 01:23
Arekusu in The lost woods
Well, with a picture like that, its a sure fire way to attract someones attention to this topic :P
(ID #38436) Posted on 2007/01/02 01:23
Gordon Pekeur in south africa -cape town-
pretty clueless when it comes to code, but I like the pic at the top!! some of my friends do a bit of coding.....I usually occupy myself with anime while they do their thing........
(ID #40748) Posted on 2007/01/02 01:23
Jon in Boston
I've got your multiple requests working, thanks. But one request is   [code][code] and I just can't get it to work in it's entirety.  Seems the XML isn't writing the proper structure. I'm using php so I tried with ob_start but just can't get it right. Any chance you'd take a look and help out?
P.S. Risa Shimamoto is fantastic.
(ID #42381) Posted on 2007/01/02 01:23
Jon
Okay, so is there a way to post code here?
(ID #42383) Posted on 2007/01/02 01:23
splog bite missionary
the whole ASYNCHRONUOUS aspect of AJAX is completely overblown.

AJAX uses this function:
xmlhttp.open(mentod,url,true);

Just make the call synchronuously:

xhtml.open(method,url,false);

DONE! No fancy libraries needed. Call your stuff multiple imes and all is well. Yes it isnt a-synchronuous, but really, do you care? unless you're loading huge amounts of code...
Edward in Michigan
Hmm...

Man, I still have a lot to learn.

Study study study...
(ID #80416) Posted on 1999/11/30 14:12
Leo in San francisco
Seems to work fine in Opera on Linux. I've been playing around with the librabries from script.aculo.us
(ID #80419) Posted on 1999/11/30 14:12
luke in virginia
thank god i've got a web development course this semester; it'll be a good refresher on javascript and a really good refresher on php
(ID #80420) Posted on 1999/11/30 14:12
Phenie in South Africa
Well... I liked the picture on the top....

The rest... well... I liked the picture ALOT!

:P
(ID #80421) Posted on 1999/11/30 14:12
[ Ash ] in Singapore
I'd definitely like to learn to Code. The Picture above I like definitely.
(ID #80423) Posted on 1999/11/30 14:12
Arekusu in The lost woods
Hmm, currently i don't know how to code, but when my bro gets back from his hols, hes gonna teach me the basics, and im gonna be making my own flashy website XD
(ID #80424) Posted on 1999/11/30 14:12
Kazuki in the land of 'Oz'
Hey man, I just discovered this site of yours (with those hilariously wholesome Trooper series of pics) and have to say, keep up the awesome work.  That Strike PG kit looks awesome btw.   

Since you're in Tokyo, were you out to see the fireworks in Sumida-ku the other day?
(ID #80427) Posted on 1999/11/30 14:12
Danny Choo in Tokyo
Didnt manage to go to the sumida fireworks as I was still down with a cold. Not sure I would have enjoyed it without getting those special seats as it does get very crowded at these venues.
(ID #80430) Posted on 1999/11/30 14:12
nodle in America
Nice picture at the top Danny!
(ID #80431) Posted on 1999/11/30 14:12
Lately, I'm a Perl coder more than anything else. I should start playibg around with AJAX....
(ID #80432) Posted on 1999/11/30 14:12
ninjascience in I'll never go back to Geo...
one commentor mentioned script.aculo.us , which also uses prototype.  I love it.

new Ajax.Updater('someDivId', 'index.php?do=getsomething');

it's that easy to return some html via Ajax and insert it into some container.  Also, be sure to check out the prototype docs at http://script.aculo.us.  There's a ton of life saving functions in there, like $(someDivId) instead of document.getElementById(someDivId)
(ID #80436) Posted on 1999/11/30 14:12
Arekusu in The lost woods
Well, with a picture like that, its a sure fire way to attract someones attention to this topic :P
(ID #80440) Posted on 1999/11/30 14:12
Gordon Pekeur in south africa -cape town-
pretty clueless when it comes to code, but I like the pic at the top!! some of my friends do a bit of coding.....I usually occupy myself with anime while they do their thing........
(ID #82752) Posted on 1999/11/30 14:12
Jon in Boston
I've got your multiple requests working, thanks. But one request is   [code][code] and I just can't get it to work in it's entirety.  Seems the XML isn't writing the proper structure. I'm using php so I tried with ob_start but just can't get it right. Any chance you'd take a look and help out?
P.S. Risa Shimamoto is fantastic.
(ID #84385) Posted on 1999/11/30 14:12
Jon
Okay, so is there a way to post code here?
(ID #84387) Posted on 1999/11/30 14:12
Previous Articles
Pagerank Redirect
comments(6)
Mac Software Update & PHP
comments(5)
Chronosync
comments(3)
Thunderbird
comments(0)
PHP GD MYSQL Apache
comments(8)
Bathyscaphe
comments(2)
Acqlite
comments(0)
Adium
comments(1)
Transmit
comments(1)
CocoThumbX
comments(0)
Smultron
comments(1)
Firefox
comments(0)
Articles being read right now...
Gundam Alex
comments(24)
A Week in Tokyo 12
comments(89)
TAF2007 - Part2
comments(29)
Crossbone Gundam
comments(20)
Sayaka Isoyama
comments(30)
Apple Keyboard
comments(54)
Maid Footcare
comments(31)
Mirai Gaia
comments(66)
Shibuya Rock Trooper
comments(183)
Evengelion Asuka
comments(83)
Mirai Suenaga
comments(48)
Tokyo Poster
comments(31)
dannychoo.com ( Creative Commons ) ( Danny Choo ) ( Anime, Gundam, Figures, Japan ) Since 2000
DVD BOX
ROOKIES  裏BOX
1.ROOKIES 裏BOX
2008/10/08 14:12
¥ 12,108
Adult DVD's
ギリギリモザイク 繰り返す昇天、壮絶アク...
1.ギリギリモザイク 繰り返す昇天、壮絶アク...
2008/02/19 14:12
¥ 2,075
Kotobukiya
涼宮ハルヒの憂鬱 涼宮ハルヒ ビーチサイ...
1.涼宮ハルヒの憂鬱 涼宮ハルヒ ビーチサイ...
2008/11/25 14:12
¥ 5,366