samkan
05-28-2007, 10:35 PM
I have posted up my code here:
http://l2alliance.freehostia.com/random.php
Here is what it is supposed to do (but does not):
1. The user inputs a message in the "text" input
2. The user can submit the message in two ways: one is by pressing enter (HTML character 13), or by clicking on the "enter" button.
3. If the user presses the enter key (HTML character 13), function entered(event) calls function submitmessage().
4. If the user clicks on the "enter" button, function submitmessage() is called directly
5. function submitmessage() gets the value of whatever is written in the textbox, and outputs the following: "<?php chatsave(THE_MESSAGE); ?>". This is written in the <div id="coding"></div> section.
6. Basically, this should call the php function chatsave with sending it THE_MESSAGE that the user has written.
7. The chatsave php function simply saves the message and other info in the database.
WHY IS THIS NOT WORKING??
http://l2alliance.freehostia.com/random.php
Here is what it is supposed to do (but does not):
1. The user inputs a message in the "text" input
2. The user can submit the message in two ways: one is by pressing enter (HTML character 13), or by clicking on the "enter" button.
3. If the user presses the enter key (HTML character 13), function entered(event) calls function submitmessage().
4. If the user clicks on the "enter" button, function submitmessage() is called directly
5. function submitmessage() gets the value of whatever is written in the textbox, and outputs the following: "<?php chatsave(THE_MESSAGE); ?>". This is written in the <div id="coding"></div> section.
6. Basically, this should call the php function chatsave with sending it THE_MESSAGE that the user has written.
7. The chatsave php function simply saves the message and other info in the database.
WHY IS THIS NOT WORKING??