Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Google Module For Checking Aim Online Status, AJAXish but not really I think
beeseven
post Apr 27 2006, 10:47 PM
Post #1


Privileged Member
*********

Group: Members
Posts: 629
Joined: 26-February 05
Member No.: 3,995



This is a module that I made for the Google personalized homepage that checks AIM online status as you type.


CODE
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="AIM Online Status Checker" height="50" />
<Content type="html">
  <![CDATA[
This is all the basic stuff you need to have it be XML
CODE
<script type="text/javascript">
Here's the first function
CODE
function check()
{
        var sn = document.getElementById("sn").value;
        if(sn == null || sn == '')
        {
                document.getElementById("online").style["display"] = "none";
                document.getElementById("offline").style["display"] = "none";
                return;
        }
        sn = escape(sn.toLowerCase());

        var str = "http://www.tjhsst.edu/~tsmilack/xml/ajax/sn.php?sn="+sn;
        var page = _IG_FetchContent(str, function(s) { update(s); });
}
This gets the String sn from the input box with id "sn." If it's blank, it hides the things that say online and offline. Finally it uses the method _IG_FetchContent to get the status from a page I wrote that connects to the AIM server. You can find out how to do that on Google. It then calls the function update using the text from the php file.
CODE
function update(response)
{
        if(response == "online")
        {
                document.getElementById("online").style["display"] = "inline";
                document.getElementById("offline").style["display"] = "none";
        }
        else
        {
                document.getElementById("offline").style["display"] = "inline";
                document.getElementById("online").style["display"] = "none";
        }
}
Since the php file online outputs "online" or "offline," it checks which it says and hides the appropriate span, revealing the other.
CODE
</script>
   <div id="thethethe" style="font-family: Arial, Sans-Serif; font-size: 10pt;">
    <form action="">
     <input type="text" id="sn" size="20" maxlength="16" onkeyup="check()" /> is
     <span id="online" style="font-weight: bold; color: #00FF00; display: none;">online</span>
     <span id="offline" style="font-weight: bold; color: #FF0000; display: none;">offline</span><br />
     <input type="button" value="Re-check" onclick="check()" />
This is the form and the two spans which say either online or offline. If you'll notice the part in the input box that says "onkeyup," that's what makes it do it as you type. If you hit Re-check, it will check if the person is online again.
CODE
    </form>
   </div>
  ]]>
</Content>
</Module>


You can add this to your own Google personalized homepage by clicking "Add Content," then "Add by URL," and putting http://www.tjhsst.edu/~tsmilack/xml/screenname.xml in the box.
Go to the top of the page
 
+Quote Post
burhan
post Apr 14 2008, 10:22 PM
Post #2


Newbie
*

Group: Members
Posts: 8
Joined: 16-March 08
Member No.: 59,420



Thank you! but why not you use any other AIM Status Checker tool?

This post has been edited by burhan: Apr 14 2008, 10:23 PM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Google/gmail Problems(13)
  2. Google Vs Yahoo(15)
  3. Php Guest Online Script(2)
  4. Google Talk Translation Bots(0)
  5. Credit System V2.0 Online(15)
  6. Hosting Account Suspended(2)
  7. Help Me Find An On-line Degree School(4)
  8. .::gunz Online Clan::.(16)
  9. Google Chat -- Blocked ?(4)
  10. What Is Programming Language Of Google Etc.?(21)
  11. Is It Really Possible To Make Any Money Online?(12)
  12. Grand Theft Auto San Andreas Online Multiplayer Mode(10)
  13. Make An Online Game To Earn Money(2)
  14. One Website = Google Adsense + Adbrite(7)
  15. Play Forex Online(1)
  1. Google Earth Plus Version(19)
  2. Slavehack(3)
  3. Do You Believe In Psychologic Tests?(13)
  4. Adding Your Website To Google(20)
  5. Google A Number?(44)
  6. How Do I Make My Own Private Online Server Please Help Me Out.thank You For Your Time.(22)
  7. The Naruto Online Game(32)
  8. Watch Free Movies And Tv Shows Streaming Online!(3)
  9. Please Can You Review My Blog(3)
  10. Google Premium Publisher(3)
  11. Webmaster Get Revenue By Placing Ads.(12)
  12. Age Of Empires 2 The Conquerors Multiplayer Online(19)
  13. Area 51 In Google Earth(50)
  14. Pay With Google Checkout. Payment Gateway By Google.(8)
  15. Google Earth Easter Egg(10)


 



- Lo-Fi Version Time is now: 26th July 2008 - 08:15 AM