Hello, I was working on a simple chat utility and i am completely stuck. The only solution which i think can complete this chat is if i can get data of a form without refreshing the whole page somewhat like what facebook does i assume.. So any suggestions? Also any suggestions if youll have for a basic chat utility, i already found one which had way too much complexity and used frames and stuff but it went totally over my head in terms of making better use of it.. i feel it can be done using easier methods.. So if anyone can help me how to get Input From Form Without Refreshing The Form It would be great? or any other suggestions are fine too.
Okay, basically i want to get input whatever string is entered in it when the submit button is pressed. <form name="input" method="post" action="<?php echo $PHP_SELF;?>"> Message:<input id="text" size="12" maxlength="12" name="message"> <br /> <button name="submit">Submit</button> </form>
I never worked on a chat system. But I suggest you at least consider 2 aspects. Use ajax technique to refresh the data. Here's a simple js object for ajax without using any framework. Even you don't input anything, the data should be able to refreshed in some interval like gmail. Use setTimeout to do this.
Okay i tried using ajax earlier too.. But Basically like each and every Chat works User but the problem is that to get data from the form input field the page has to be submitted and hence ajax does not work.. Can you show me an example of getting data from a field without refreshing the page or using ajax?