poornima Posted May 1, 2009 Share Posted May 1, 2009 Hey ! I have to make a Live chat chat feature on my website. If sombody comes to my website and clik the link " Live chat" a window will open on site and same time window will open on admin panel also.... Has nybody worked on Live chat systems ? if yes then please tell me the concept ! Quote Link to comment https://forums.phpfreaks.com/topic/156412-live-chat/ Share on other sites More sharing options...
Ken2k7 Posted May 1, 2009 Share Posted May 1, 2009 If you want to do this with PHP and MySQL, you'll need to include in AJAX. What experience do you have with all 3 of those languages? Quote Link to comment https://forums.phpfreaks.com/topic/156412-live-chat/#findComment-823502 Share on other sites More sharing options...
Soulstealer Posted May 2, 2009 Share Posted May 2, 2009 i have just finished a chatroom.....http://cybernet.comyr.com/chatroom/chatroom.php user - test pass - test Quote Link to comment https://forums.phpfreaks.com/topic/156412-live-chat/#findComment-823965 Share on other sites More sharing options...
Ken2k7 Posted May 2, 2009 Share Posted May 2, 2009 Soulstealer, what is this all about? var obj; obj = document.getElementById(form_id); for(i=0;i<obj.length;i++) { /*alert(obj[i]);*/ if (obj[i].tagName == "INPUT") { if (obj[i].type == "text") { getstr +=obj[i].name+"="+obj[i].value+"&"; } else if(obj[i].type == "hidden") { getstr +=obj[i].name+"="+obj[i].value+"&"; } } else if(obj[i].tagName == "SELECT") { var sel = obj[i]; getstr +=sel.name +"="+ sel.options[sel.selectedIndex].value + "&"; } } If you're getting an element by ID, why would you loop? There should ALWAYS be one entry. Quote Link to comment https://forums.phpfreaks.com/topic/156412-live-chat/#findComment-823987 Share on other sites More sharing options...
Soulstealer Posted May 2, 2009 Share Posted May 2, 2009 have two ways ID and unquie ID thats the second loop.. Quote Link to comment https://forums.phpfreaks.com/topic/156412-live-chat/#findComment-824263 Share on other sites More sharing options...
Ken2k7 Posted May 2, 2009 Share Posted May 2, 2009 You're saying you have two elements with the same ID? Wow, learn xHTML will ya? Quote Link to comment https://forums.phpfreaks.com/topic/156412-live-chat/#findComment-824444 Share on other sites More sharing options...
Soulstealer Posted May 2, 2009 Share Posted May 2, 2009 not same id one is ID exp 1 unquie id like qhb34rg and im new to this stuff so stfu Quote Link to comment https://forums.phpfreaks.com/topic/156412-live-chat/#findComment-824500 Share on other sites More sharing options...
dbo Posted May 3, 2009 Share Posted May 3, 2009 @Ken2k7 Where is your chatroom? I'm not suggesting that Soulstealer's approach is the best, but it's easy to criticize from the bench. @poornima Unless there is a good reason to build this yourself why not leverage something that is already built. No point reinventing the wheel here. Quote Link to comment https://forums.phpfreaks.com/topic/156412-live-chat/#findComment-824889 Share on other sites More sharing options...
Ken2k7 Posted May 3, 2009 Share Posted May 3, 2009 @Ken2k7 Where is your chatroom? I'm not suggesting that Soulstealer's approach is the best, but it's easy to criticize from the bench. I need a chatroom for show just to say that you shouldn't have more than one HTML element with the same ID on the same page? Well in that case, I'll post links to pages that say that in the future. How's that? Quote Link to comment https://forums.phpfreaks.com/topic/156412-live-chat/#findComment-825102 Share on other sites More sharing options...
dbo Posted May 5, 2009 Share Posted May 5, 2009 Not necessary, and I'm not saying you're comment was inaccurate... just lose references like this: Wow, learn xHTML will ya? It puts people on the defensive. A more productive approach would have been something like: Nice job on building this as a proof of concept. I would caution however that using the same ID for multiple elements is not a good practice. You could improve it by... Not interested in arguing with you, just please be careful how you approach people. We want to keep these forums a productive place so that the community grows. That's really all I'm encouraging. Quote Link to comment https://forums.phpfreaks.com/topic/156412-live-chat/#findComment-826419 Share on other sites More sharing options...
Ken2k7 Posted May 5, 2009 Share Posted May 5, 2009 Ah gotcha. I'll put up my best effort to keep that in mind. Quote Link to comment https://forums.phpfreaks.com/topic/156412-live-chat/#findComment-826513 Share on other sites More sharing options...
dbo Posted May 5, 2009 Share Posted May 5, 2009 Thanks Ken. Quote Link to comment https://forums.phpfreaks.com/topic/156412-live-chat/#findComment-826744 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.