PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sat Aug 08, 2020 6:12 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Jul 15, 2005 12:35 pm 
Offline
Spockulator
User avatar

Joined: Wed Feb 04, 2004 9:15 pm
Posts: 4714
Location: Eden, Utah


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 27, 2005 8:21 pm 
Offline
Forum Contributor

Joined: Tue Mar 09, 2004 10:05 am
Posts: 168
Location: Arkansas, USA
I'm unaware of how I missed this... but thanks, Burrito.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 27, 2005 9:09 pm 
Offline
Tutorials Group

Joined: Sun Jan 04, 2004 11:30 pm
Posts: 2692
Syntax: [ Download ] [ Hide ]
require_once("../includes/dbInteract.php");

Gonna need an example of that to make it work locally.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 27, 2005 9:43 pm 
Offline
Spockulator
User avatar

Joined: Wed Feb 04, 2004 9:15 pm
Posts: 4714
Location: Eden, Utah
dbInteract.php is just a function with the mysql connection info:

ex:
Syntax: [ Download ] [ Hide ]
function tt_db_connect()

{

  if (!defined("CONNECTED"))

  {

    mysql_connect(DBHOST, DBUSER, DBPASS)

      or die("Couldn't make database connection. Check your configuration ".mysql_error());

    mysql_select_db(DBSOURCE)

      or die("Couldn't select database. Check your configuration ".mysql_error());

    define("CONNECTED", TRUE);

  }

}


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 3:56 pm 
Offline
Briney Mod
User avatar

Joined: Mon Jan 19, 2004 7:11 pm
Posts: 6446
Location: 53.01N x 112.48W
So you finally posted it eh? I'll see what I can do with Firefox (there I go, making it sound like I know what I'm doing).

What type of problems - with the JS I'd assume?

_________________
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 4:03 pm 
Offline
Spockulator
User avatar

Joined: Wed Feb 04, 2004 9:15 pm
Posts: 4714
Location: Eden, Utah


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 5:32 pm 
Offline
DevNet Master

Joined: Tue Jan 20, 2004 12:11 am
Posts: 4897
Location: Leuven, Belgium


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 10:30 pm 
Offline
Tutorials Group

Joined: Sun Jan 04, 2004 11:30 pm
Posts: 2692


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 10:32 pm 
Offline
DevNet Master

Joined: Tue Jan 20, 2004 12:11 am
Posts: 4897
Location: Leuven, Belgium
According to IE has it's own oddities with caching ;)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 11:33 pm 
Offline
Tutorials Group

Joined: Sun Jan 04, 2004 11:30 pm
Posts: 2692


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 09, 2005 4:34 pm 
Offline
Forum Contributor
User avatar

Joined: Mon Mar 10, 2003 7:12 am
Posts: 214
Location: Johannesburg,South Africa


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 09, 2005 4:55 pm 
Offline
Tranquility In Moderation
User avatar

Joined: Sun Feb 06, 2005 8:18 pm
Posts: 5001
Location: Indiana
I've written a simple DHTML chat, which works flawlessly in all browsers that I've tested (IE, Opera, Netscape, & FF)

_________________
- A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 09, 2005 5:02 pm 
Offline
Forum Regular
User avatar

Joined: Thu Nov 25, 2004 10:53 pm
Posts: 708
Location: U Michigan
I'm trying to put together a chat app for a project and its a bitch - lookin to share the knowledge scrotaye?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 10, 2005 2:59 am 
Offline
Tranquility In Moderation
User avatar

Joined: Sun Feb 06, 2005 8:18 pm
Posts: 5001
Location: Indiana
Basically you have two <div> layers. The chat log in one, the message form box in the other.

Then you have two hidden iframes. one to process new posted messages, another to see if there's any new messages to post to the chat log

The post page, inserts records into the database when someone submits the message box form

The other one, uses javascript to refresh every one second (javascript makes it seemless) and append the new information (if there is any) to the chat log area. This creates a perfect, non-flickering, non-refreshing, java-like DHTML chat.

If you'd like specifics, PM me, and I'll show you my code.

_________________
- A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 10, 2005 6:05 am 
Offline
DevNet Master

Joined: Tue Jan 20, 2004 12:11 am
Posts: 4897
Location: Leuven, Belgium
Here is a snippet wrote once.. (It uses )
I've changed to a longer time to refresh because it's not nice to flood your webserver ;) (And XMLHTTP requests don't seem to understand http cache)





Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group