How to create a Comment Box/Guestbook in HTML

Please support our Site Layout and Usability advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Sep 2005
Posts: 102
Reputation: Niklas is an unknown quantity at this point 
Solved Threads: 0
Niklas's Avatar
Niklas Niklas is offline Offline
Junior Poster

How to create a Comment Box/Guestbook in HTML

 
0
  #1
Nov 1st, 2006
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: My Blog WebPage:

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.
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 102
Reputation: Niklas is an unknown quantity at this point 
Solved Threads: 0
Niklas's Avatar
Niklas Niklas is offline Offline
Junior Poster

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

 
0
  #2
Nov 11th, 2006
bump
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,311
Reputation: vishesh is on a distinguished road 
Solved Threads: 36
vishesh's Avatar
vishesh vishesh is offline Offline
Nearly a Posting Virtuoso

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

 
0
  #3
Nov 11th, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,834
Reputation: niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute 
Solved Threads: 297
Moderator
Featured Poster
niek_e's Avatar
niek_e niek_e is online now Online
Roasting Maven

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

 
0
  #4
Nov 17th, 2006
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.
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.
Originally Posted by Niklas
bump


Regards Niek
Last edited by niek_e; Nov 17th, 2006 at 9:00 am.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 4
Reputation: hax_hp is an unknown quantity at this point 
Solved Threads: 1
hax_hp hax_hp is offline Offline
Newbie Poster

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

 
0
  #5
Nov 26th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,203
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

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

 
0
  #6
Nov 28th, 2007
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.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Site Layout and Usability Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC