Welcome, Guest.
Login
|
Register
Username:
Password:
Remember me:
User online chat
Please log in to post.
Watch thread
Unwatch thread
Started by
Chanishyy
15 Feb 2012 19:45
By
Chanishyy
(
154
)
On 15 Feb 2012 19:46
On my chat l want users to be on 'top' showing that they are online on it! But how?
Existance alludes
By
M.J kInG
(
1334
)
On 16 Feb 2012 01:20
you need a ajax function then you uses id to call what ever like this.
ChatObj.document.getElementById('chatroom_online).innerHtml=ChatObj.responseText;
A true developer
By
Chanishyy
(
154
)
On 16 Feb 2012 11:23
Where do l put the function? I need to learn ajax too -.-
Existance alludes
By
M.J kInG
(
1334
)
On 16 Feb 2012 12:02
This just part of the function
UserObj - new XMLHttpRequest();
function GetUserObj();
GetUserObj.onreadystatechange = function() {
if(GetUserObj.readyState 4 && GetUserObj.status == 200) {
document.getElementById('chatroomonline').innerHTML=responseText;
var Chat = document.getElementById("Chat").value;
GetUserObj.open("GET","/Chatroom_online.php?Chat="+Chat,true);
GetUsersObj.send();
setinterval('get_users()',3500);
I might have wrote this wrong but it just a example.
A true developer
By
Chanishyy
(
154
)
On 16 Feb 2012 12:10
Do I put it in my chatroom code :<script>here</stript> ?
Existance alludes
By
M.J kInG
(
1334
)
On 18 Feb 2012 05:58
Yupe
Example:
<script type="text/javascript">
var GetUserObj;
var Chat = document.getElementById('Chat').value;
GetUserObj - new XMLHttpRequest();
function GetUserObj();
GetUserObj.onreadystatechange = function() {
if(GetUserObj.readyState 4 && GetUserObj.status == 200) {
document.getElementById('chatroomonline').innerHTML=responseText;
GetUserObj.open("GET","/Chatroom_online.php?Chat="+Chat,true);
GetUsersObj.send();
}
window.onload = function() {
setinterval('get_users()',3500);
}
</script
A true developer
By
Chanishyy
(
154
)
On 18 Feb 2012 13:32
Ohhhh! I'll. Lock this because am still learning php basics.
Existance alludes
By
Chanishyy
(
154
)
On 18 Feb 2012 13:59
<script>document.body.scrollTop=176;</script><style>iframe{font-size:10px;background:#fff;border:2px ridge cyan;}#name{background:#ddd;width:150px;border:1px groove black;border-top:0px;text-shadow:3px 1px 0px grey;}body{margin:0px;background:#ddd;}#top{width:240px;height:175px;overflow:hidden;}input{background:#fff;border:2px ridge cyan;border-left:0px;border-right:0px;}#bottom{width:240px;height:176px;overflow:hidden;}</style><script>function init(){document.body.scrollTop=176;setTimeout(nextPage;5000);}else{</script><html><title>Chatroom Origin</title><head><meta name="viewport"content="width=240"></head><body><div id="top"><center><div id="name">Chatroom Origin</div></center><br><script type="text/Java Script">
var GetUserObj;
var Chat = document.getElementById('Chat').value;
GetUserObj - new XMLHttpRequest();
function GetUserObj();
GetUserObj.onreadystatechange = function() {
if(GetUserObj.readyState 4 && GetUserObj.status == 200) {
document.getElementById('chatroomonline').innerHTML=responseText;
GetUserObj.open("GET","/Chatroom_online.php?Chat="+Chat,true);
GetUsersObj.send();
}
window.onload = function() {
setinterval('get_users()',3500);
}
</script>
</div><div id="bottom"><div style="white-space:nowrap;height:176px;width:240px;overflow:hidden;text-align:justify;"><iframe src="/chat_view.php"width="235"height="140"style="opacity:0.7;"></iframe><br><form action="/chat_insert.php"method="POST"><input type="text"name="post"> <input type="submit"value="Send"></form></div></div></body>
<a href="/index.php">Exit</a>
I tried it and typed 'test'. Nothing but I'm checking.
Existance alludes
By
M.J kInG
(
1334
)
On 19 Feb 2012 03:47
You method post are wrong.
A true developer
By
Chanishyy
(
154
)
On 19 Feb 2012 03:51
Dang it! I deleted the chatroom its too hard to learn fusion . (Ajax) . But l have one error on my status/index.php
I want my name to have *Admin* but it doesn't work when l put $row['ranks]
Existance alludes
By
Ch14234
(
62
)
On 14 Mar 2012 15:28
wait...whaat?
Xbox Gamertag- CHTY14
By
Chanishyy
(
154
)
On 15 Mar 2012 07:35
Hmm
Existance alludes
By
M.J kInG
(
1334
)
On 15 Mar 2012 13:30
Chanishyy you just need to studies it more.
A true developer
Nintendo 3DS is ™ Nintendo Co. Ltd. This website is ©2009-2024 HullBreach Studios. All rights reserved. Members are responsible for their own content. No account information will be given to third-parties without your consent.