User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Site Layout and Usability section within the Web Development category of DaniWeb, a massive community of 422,812 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,330 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Site Layout and Usability advertiser: Programming Forums
Views: 38124 | Replies: 5
Reply
Join Date: Sep 2005
Posts: 102
Reputation: Niklas is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Niklas's Avatar
Niklas Niklas is offline Offline
Junior Poster

How to create a Comment Box/Guestbook in HTML

  #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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2005
Posts: 102
Reputation: Niklas is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Niklas's Avatar
Niklas Niklas is offline Offline
Junior Poster

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

  #2  
Nov 11th, 2006
bump
Reply With Quote  
Join Date: Oct 2006
Location: India
Posts: 1,289
Reputation: vishesh is on a distinguished road 
Rep Power: 4
Solved Threads: 32
vishesh's Avatar
vishesh vishesh is offline Offline
Nearly a Posting Virtuoso

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

  #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 8:10 am.
Reply With Quote  
Join Date: Oct 2006
Location: the Netherlands
Posts: 1,774
Reputation: niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all 
Rep Power: 11
Solved Threads: 185
niek_e's Avatar
niek_e niek_e is offline Offline
Posting Virtuoso

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

  #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 8:00 am.
Want better/more replies to your questions? Wrap your code in [code] [/code] tags!
do NOT pm me for help, in the best case, you'll get ignored
Reply With Quote  
Join Date: Nov 2007
Posts: 4
Reputation: hax_hp is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hax_hp hax_hp is offline Offline
Newbie Poster

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

  #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 2:51 am.
Reply With Quote  
Join Date: Jan 2007
Posts: 2,556
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 114
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

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

  #6  
Nov 27th, 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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Site Layout and Usability Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Site Layout and Usability Forum

All times are GMT -4. The time now is 10:03 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC