943,587 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Nov 1st, 2006
-1

How to create a Comment Box/Guestbook in HTML

Expand Post »
Well I have this website about a month blog I make concerning a Massive Multiplayer Online Role Playing Game. Call me addicted or what for making a blog of my playing expirience and achievements, but I am asking here due to my WebPages techinical details. It's hosted on geocities so although I would like to add frames (and have already scripted them) I can't because Geocities doesn't support frames.

My Blog WebPage: [URL removed]

Anyways as you can tell from my WebPage my HTML is fairly basic and requires no special tags whatsoever. I'm thinking of adding tables, which I know how to do but is just a hassle as I can't picture in my head exactly where everything goes and have to preview it dozens of times.
Alright, finally, my question is HOW DO I SCRIPT A COMMENT BOX/GUSTBOOK?

I want to add a comment box on the Webpage instead of having my WebPage link to an external site. However most open source guestbooks I have found all use the external web site way. How do I script a comment box of my own, using what tags, and a brief description of their special properties. The main problem I am forecasting is how to have the comment box be updated on the WebPage for everyone to see every time someone enters a message. I'm guessing there is some way to embed the application/script into the WebPage directly, and also that I'm going to need to use Javascript, which I am scared out of my wits of because it looks so confusing.

Any ideas on whether the comment box can be in HTML or Javascript (or combination of the two)?

How far will I have to go into learning the language before I can produce the comment box (basic features, just Name, auto insert date/time,Message,maybe some font changes.)?

Thanks a lot guys.
Last edited by Ezzaral; Jun 25th, 2010 at 2:09 pm. Reason: snipped link
Similar Threads
Reputation Points: 14
Solved Threads: 0
Junior Poster
Niklas is offline Offline
104 posts
since Sep 2005
Nov 11th, 2006
0

Re: How to create a Comment Box/Guestbook in HTML

bump
Reputation Points: 14
Solved Threads: 0
Junior Poster
Niklas is offline Offline
104 posts
since Sep 2005
Nov 11th, 2006
0

Re: How to create a Comment Box/Guestbook in HTML

To make a comment box, you need both Javascript and HTML. HTML for forms and JS for scripting it. Also you could use Server Side Pages which is a better approach. These scripts will mail you whatever the visiter has written in the form.

Another piece of advice: please make your problem concise and precise, so that it could be easy for us and other to read.
Last edited by vishesh; Nov 11th, 2006 at 9:10 am.
Reputation Points: 85
Solved Threads: 42
Nearly a Posting Virtuoso
vishesh is offline Offline
1,362 posts
since Oct 2006
Nov 17th, 2006
0

Re: How to create a Comment Box/Guestbook in HTML

Quote originally posted by Niklas ...
HOW DO I SCRIPT A COMMENT BOX/GUSTBOOK?
If you want a guestbook you should have a database (mysql) and read/write from/to it using PHP.
But since you can't even use frames, I'm guessing this could be a problem... Perhaps you should think about changing provider.
Quote originally posted by Niklas ...
How far will I have to go into learning the language before I can produce the comment box
Not that far, there are plenty of example codes to found on te internet.
Quote originally posted by Niklas ...
bump


Regards Niek
Last edited by Nick Evan; Nov 17th, 2006 at 9:00 am.
Moderator
Featured Poster
Reputation Points: 4142
Solved Threads: 394
Industrious Poster
Nick Evan is offline Offline
4,132 posts
since Oct 2006
Nov 26th, 2007
0

Re: How to create a Comment Box/Guestbook in HTML

Hey dude it is very very easy..Read a little about ASP and MS ACCESS..Learn how to connect them together and then use your brain and I am sure you'll figure it out..It aint hard if you try..Here I'll give you a little push..

Connection String to MS ACCESS DATABASE
OleDbConnection Con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\YourDatabase.mdb");

Now Lets see How to retrieve info from the database.

OleDbConnection Con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\YourDatabase.mdb");
        	OleDbCommand Com = new OleDbCommand("Seleect * From CommentBox", Con);
        	try
        	{
           		 Con.Open();
            		 OleDbDataReader dReader = Com.ExecuteReader();

            		while (dReader.Read())
            		{
             //Make sure your database file has a table named "CommentBox"
            //Simple Example...Here is your "CommentBox"  table layout
                        /* Comments   |   Users    |   Password
                          =======================================
                            Blah Blah     |  Meee     |  MyPassword
                          =======================================
                           And sooo on...
                       */
                                      
                         //Now lets retrieve the password from the user named Meee

                                    string Pass = dReader.GetString(2);
                                    string User = dReader.GetString(1);
                                    string Comment = dReader.GetString(0);

                         //There ya go..Have fun coding bro..   
            		}
            		Con.Close();
		}
		catch (OleDbException ex)
        	{
           		 Response.Write(ex.ToString());
        	}
Last edited by hax_hp; Nov 26th, 2007 at 3:51 am.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
hax_hp is offline Offline
4 posts
since Nov 2007
Nov 28th, 2007
0

Re: How to create a Comment Box/Guestbook in HTML

You can't do it with just HTML and JavaScript, because they run on the user's computer. You need a script that runs on your website's server to achieve this.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Dec 12th, 2009
0
Re: How to create a Comment Box/Guestbook in HTML
I want to make one electronics solution site and I want to use comment box in this site. where my user can post question box.and they can post answer aslo. I dont have any idea of comment box . so if u provide me idea with code of comment , it will be great.........
thank you
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rozadeep is offline Offline
1 posts
since Dec 2009
May 3rd, 2010
0
Re: How to create a Comment Box/Guestbook in HTML
wow, seems like you not really getting there. i would suggest that you just create a wordpress blog and link via that.
Reputation Points: 13
Solved Threads: 18
Junior Poster
MJ Pieterse is offline Offline
144 posts
since Mar 2009
May 10th, 2010
0
Re: How to create a Comment Box/Guestbook in HTML
Most CMS have this feature built in... maybe look into upgrading to the new versions of modx, joomla, drupal or wordpress
Reputation Points: 12
Solved Threads: 1
Junior Poster in Training
newviewit.com is offline Offline
86 posts
since Sep 2009
Jul 23rd, 2010
0
Re: How to create a Comment Box/Guestbook in HTML
<!-- begin htmlcommentbox.com -->
 <div id="HCB_comment_box"><a href="http://www.htmlcommentbox.com">HTML Comment Box</a> is loading comments...</div>
 <link rel="stylesheet" type="text/css" href="http://www.htmlcommentbox.com/static/skins/shady/skin.css" />
 <script type="text/javascript" language="javascript" id="hcb"> /*<!--*/ (function(){s=document.createElement("script");s.setAttribute("type","text/javascript");s.setAttribute("src", "http://www.htmlcommentbox.com/jread?page="+escape((typeof hcb_user !== "undefined" && hcb_user.PAGE)||(""+window.location)).replace("+","%2B")+"&opts=403&num=10");if (typeof s!="undefined") document.getElementsByTagName("head")[0].appendChild(s);})(); if(typeof hcb_user=="undefined")hcb_user={};hcb_user.submit="";/*-->*/ </script>
<!-- end htmlcommentbox.com -->
Great?
Reputation Points: 10
Solved Threads: 1
Newbie Poster
TrigonSearch is offline Offline
13 posts
since Jul 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Site Layout and Usability Forum Timeline: Using mod_rewrite to make a url more friendly
Next Thread in Site Layout and Usability Forum Timeline: What is the best place to create website at?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC