Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jan 2008
    Posts
    334
    Thanks
    9
    Thanked 0 Times in 0 Posts

    JavaScript show results from the database

    I'm sure that title doesn't totally explain what I'm needing and looking for. I'm working on a chat box for my site. I was thinking of ways that I could build this chat box and one of the things that I thought would be cool is to not have to refresh the page whenever someone enters another line of chat. I simpy want whenever someone enters another line of chat it would auto display the new text on the screen without having to refresh the page. I was also thinking that it would be cool if it has a fade in effect kinda like (not required though).

    I couldn't think of anything better then JavaScript to do this job. Though I'm a JavaScript nubby.. I can write HTML, CSS, PHP and work with mysql but only thing I know about JavaScript is:

    Code:
    <script type="text/javascript">
    document.write("Oh yay, look at my pretty text. :)");
    </script>
    So as you can see I am not very knowledge in JavaScript, I thought I could simply go to google and type in... Well, not to sure what the script would be called... So yeah, if you guys could give me some help on this one, that would be lovely.

    Thanks,
    Jon W

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,240
    Thanks
    203
    Thanked 2,554 Times in 2,532 Posts
    Quote Originally Posted by Jon W View Post
    I simpy want whenever someone enters another line of chat it would auto display the new text on the screen without having to refresh the page.

    That is not possible - the page must necessarily refresh if new content is to be displayed.



    "There are a lot of tired legs in those white shirts" - Football Commentator


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •