I have a form that is a
chat apps am building
for project. Now
everything seems to be
working fine to best of
my ability.
Now i want to submit
the data from the form
into my php script
without any form of
reload. That means i
don’t want redirection
to the action page and
back to the chat page.
What i want is for the
page to submit the
form at the background.
And i know i need ajax
to this bt i cnt get it
right. Here is my form
<form method="post"
id='chatbox'
action="reply.php">
<input type="text"
id="text"
name="adchat"/>
<input type='hidden'
id='user_id' name='id'
value='1'>
<input type='hidden'
id='user_name' name='id'
value='Ben'>
<input type='submit'
id='submit' name='chat'
value='send'></form>
What i need is an ajax
code to submit d
variable to the reply.php
scrit and maybe a
message to display
when the form it been
submitted say
something like
(sending…). Thanks for
assiting. Am sorry that i did not paste Ajax code that is because i don’t know it so please forgive me. Donot bother about the view of the input. Thanks once again