Page 1 of 1

Site changes - 07/15/06 - AJAX

Posted: Sat Jul 15, 2006 12:25 pm
by anonymous_object
Hi all,
I've updated the site with a new feature I'd like to test. It's AJAX which is a first for me ;)
Anyway, it concerns the 'add to favorites' link. Previously, when you clicked it, the whole page reloaded and redirected you to the same image with the image marked as a fav.

Now, you can click the link and the image is added to your list of favorites on the fly, without having to reload the current page. I think this will make managing favorites a lot faster and reduce server load & bandwidth.

Since this is a new way of coding for me, let me know if you find and problems with it
Thanks! :D

Posted: Sat Jul 15, 2006 12:27 pm
by anonymous_object
Oh, and if this new feature works out well, I may change other functions of shuushuu to work this way too (rating images, replying, etc). Suggestions on how to use AJAX are welcome.

Posted: Sat Jul 15, 2006 1:08 pm
by Fettgans
Hello, I have problems with this function I put http://e-shuushuu.net/image.php?mode=vi ... e_id=26111 in my favorites. It displayed "Favorite: Image added as a favorite [Remove from favorites]" but after a refresh it displayed "Favorite: Add this image to my favorites!" again and it wasn't in "My Favorites" page.

I use IE 6.0.something and never had problems with other website using AJAX.
Edit : Doesn't seem to work with Firefox 1.5 neither
Edit 2 : I think the problem is in the httpreq file. It's certainly a stupid question but didn't you forget to open a sql connection ? I made this mistake the first time I tried to use this XMLhttprequest thing.

Posted: Sat Jul 15, 2006 1:20 pm
by anonymous_object
Roger that, I made a mistake when copying the files over from my dev environment to the live... should work now

Posted: Sat Jul 15, 2006 1:24 pm
by Fettgans
Yes, it works great now :D