Author |
Topic |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 20 December 2004 : 05:45:41
|
Hi all, back for another flying visit; Woo.ie still taking up a ridiculous amount of my time. In the process of writing a chat room script and I'm pretty much where I want to be with it. Only thing that's bugging the hell out of me is that I'm using a meta refresh to grab new messages from the database. So I've been trying to think of methods I could use that wouldn't require a refresh and that annoying flicker while staying away from obvious solutions like Flash and Java. One solution I may have come up with is somehow using XML to update the messages on-screen without refreshing the page. Unfortunately, being an XML newbie, I don't exactly know how I might go about this or if it's even possible.
Any pointers any of ye may have in the way of advice or tutorials would be a great help. Been everywhere Auntie Google has pointed me and the closest I can get is Natterchat v1.2 which is still under development but indicates that it may be possible.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
pdrg
Support Moderator
United Kingdom
2897 Posts |
Posted - 20 December 2004 : 06:07:37
|
Hey man,
XML itself is not a magic technology that will fix your problems - from what you're saying, you want some event to poll for new messages regularly, XML would just be the data carrier. If you're planning to just update a portion of the screen, you could just update the innerhtml of a span/div/whichever, but you would still require an event of some sort to retrieve the refreshed content, hence most chat apps having a post/refresh button.
XML itself is simple - just think of it as a superset of HTML/subset of SGML for describing data. You make your own tags and structure to suit yourself (but you would have to render them client-side, so you may as well just use innerhtml and use standard HTML tags imho)
hth |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 20 December 2004 : 06:15:09
|
Cheers, pdrg Really showed my XML greenness with that one, 'ey? To be honest I've only worked with XML twice (OWM's MyOwnGoogle & PayPal's IPN) so I had no idea what I was talking about! Looks like it's back to one of my original solutions using Javascript, so.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
pdrg
Support Moderator
United Kingdom
2897 Posts |
Posted - 20 December 2004 : 06:50:00
|
Yep, reckon so - XML will only package the data for you, in a way you can transmit it easily and structure it nicely...except in this case it'd cause you more work than it would solve.
Javascript and spans/divs sounds like the way to go |
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 20 December 2004 : 07:09:58
|
Thanks for the linkage, wii Shall add that to our list of options. Right now our choices are: using Javascript to prevent the flicker, biting the bullet and going the Flash route or a couple of third party scripts we've got bookmarked.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 20 December 2004 : 08:31:13
|
There are a few others without flicker, if you need more links. |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 20 December 2004 : 09:21:59
|
That'd be great, cheers wii Got a good few bookmarked but you may have some we don't.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 20 December 2004 : 09:44:49
|
Ok, I forgot the absolute best chat script I´ve ever used: http://www.gtchat.de - demo: http://www.gtchat.org/cgi-bin/gtchat95/chat.pl
This application (which I have used for years now) is written in Perl, and doesn´t run on Windows servers, but other than that it´s excellent. No flicker at all and lots of features. |
Edited by - wii on 20 December 2004 09:50:22 |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 20 December 2004 : 10:07:57
|
Thanks, man; shall save that one for future reference - problem at the mo' is ... we're on a Windows box! D'oh!
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 20 December 2004 : 10:14:25
|
Yeah, my largest forum is on a Windows server too, what I did is use a friends Linux server, and link to the chat from my forum, I also included online users using a javascript include - works fine. It´s great to have good server connections. |
|
|
|
Topic |
|