reset password
Author Message
yurimuradyan
Posts: 42
Posted 09:51 May 15, 2009 |

Dr. Sun,

I was wondering if we could use jQuery for "Fold/unfold archive using Ajax" section of the homework?

Also, when do we refresh the display (where last 5 entries are now)? Do we do that only when individual blog entries are clicked or do we also do that when a month/year is clicked as well?

Thanks in advance!

cysun
Posts: 2935
Posted 13:33 May 15, 2009 |
yurimuradyan wrote:

Dr. Sun,

I was wondering if we could use jQuery for "Fold/unfold archive using Ajax" section of the homework?

Also, when do we refresh the display (where last 5 entries are now)? Do we do that only when individual blog entries are clicked or do we also do that when a month/year is clicked as well?

Thanks in advance!

Yes. You can use any library you want. For JavaScript libraries, put them under web/javascript so they are included in your csns.zip. For Java libraries, upload the jar files together with csns.zip when you submit your homework.

Also, when do we refresh the display (where last 5 entries are now)? Do we do that only when individual blog entries are clicked or do we also do that when a month/year is clicked as well?

Thanks in advance!

When you click month/year, it should only do foldering/unfoldering. The individual blog entry doesn't have to be "clickable" in this assignment. In the next assignment we'll do something like viewBlogEntry which shows only the selected blog entry and its comments. You can implement it in this assignment if you want.

Last edited by cysun at 13:35 May 15, 2009.
yurimuradyan
Posts: 42
Posted 14:10 May 15, 2009 |
cysun wrote:
yurimuradyan wrote:

Dr. Sun,

I was wondering if we could use jQuery for "Fold/unfold archive using Ajax" section of the homework?

Also, when do we refresh the display (where last 5 entries are now)? Do we do that only when individual blog entries are clicked or do we also do that when a month/year is clicked as well?

Thanks in advance!

Yes. You can use any library you want. For JavaScript libraries, put them under web/javascript so they are included in your csns.zip. For Java libraries, upload the jar files together with csns.zip when you submit your homework.

Also, when do we refresh the display (where last 5 entries are now)? Do we do that only when individual blog entries are clicked or do we also do that when a month/year is clicked as well?

Thanks in advance!

When you click month/year, it should only do foldering/unfoldering. The individual blog entry doesn't have to be "clickable" in this assignment. In the next assignment we'll do something like viewBlogEntry which shows only the selected blog entry and its comments. You can implement it in this assignment if you want.

Great! Thanks a lot!!

jadiagaurang
Posts: 53
Posted 04:07 May 16, 2009 |

I learnt few method of Prototype JS for my midterm presentation. I believe that some of them are really help for our Blog achieve fold/unfold feature. They are as Element.show()Element.hide()Element.toggle() and may be document.getElementsByClassName. I have coded simple fold/unfold achieve, as I understand from homework description.

Take a look at http://gaurangjadia.com/code/cs520/ If I am doing wrong then let me know... Innocent

cysun
Posts: 2935
Posted 09:03 May 19, 2009 |
jadiagaurang wrote:

...

Take a look at http://gaurangjadia.com/code/cs520/ If I am doing wrong then let me know... Innocent

The folding/unfolding effect looks right, but note that it should be implemented using Ajax, not just JavaScript hide/unhide. In other words, you should not just get all the years and months and titles all at once and then just hide/unhide. Instead, when unfolding a year, send an Ajax request to retrieve the months, and when unfolding a month, send an Ajax request to retrieve the titles.