Jump to content

Commenting System


Nathan
 Share

Recommended Posts

  • Administrators

I've already created a comment system in my application that does not reload the page when you submit.

 

Now what I would like to do is similar to the Facebook comment button. When just viewing it's just the word "Comment" if you click the word then a box opens and drops down for you to enter your comment then submit. What method would I use to do this?

 

Tutorial Link?

Link to comment
Share on other sites

  • Administrators

Yes, just simply have the comment box hidden inside a div.

 

Use jquery or old school js to show it when the "comment" button is clicked. you can do all sorts of fancy animations to show the comment box.

 

I was trying it with jQuery last night for a couple hours and just wasn't getting it to work. Have any good tutorial links?

Link to comment
Share on other sites

  • Administrators

Ah figured it out, the issue that I was having is the auto page refresh. Once I turned it off it works fine.

 

But a new problem If I turn back on the page loads correctly and works until it goes to refresh that div, after refresh the hide/show div no longer works on comments and is opened up.

 

I need the page to auto refresh the main div it is, but also need this comment div hide/show to work.

Link to comment
Share on other sites

  • Administrators

could you paste the javascript code that's giving you the issue?

 

I ended up getting this working. Currently it will count the number of comments and show them to you.

 

I now need to modify further so that on click it will show the current comments and also have a spot to enter a new comment. Everything continues to get harder as I keep adding to it :)

Link to comment
Share on other sites

I ended up getting this working. Currently it will count the number of comments and show them to you.

 

I now need to modify further so that on click it will show the current comments and also have a spot to enter a new comment. Everything continues to get harder as I keep adding to it :)

 

Bet your learnin though ;)

Link to comment
Share on other sites

  • Administrators

Bet your learnin though ;)

 

Yup, learning quite a bit, turns out I found a better tutorial to do what I wanted on just showing a drop down div here.

 

Now that that's all finished I need to include a spot for inserting new comments. This seems to be a little harder since I'm grabbing the comments from an include file.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...