|
|
|
|
![]() ![]() |
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" ?> This is all the basic stuff you need to have it be XML<Module> <ModulePrefs title="AIM Online Status Checker" height="50" /> <Content type="html"> <![CDATA[ CODE <script type="text/javascript"> Here's the first functionCODE function check() 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.{ 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); }); } CODE function update(response) Since the php file online outputs "online" or "offline," it checks which it says and hides the appropriate span, revealing the other.{ 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"; } } CODE </script> 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.<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()" /> 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. |
|
|
|
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 |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 26th July 2008 - 08:15 AM |