Jul 20, 2008

Google Module For Checking Aim Online Status - AJAXish but not really I think

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

free web hosting

Google Module For Checking Aim Online Status - AJAXish but not really I think

beeseven
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.

 

 

 


Reply

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

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : google, module, checking, aim, online, status, ajaxish

  1. Wanna Learn Html From Scratch
    downloade an online tutorial,formatted my c: lost it forever,and FORGO (5)
  2. Play Mp3 Music Online
    question (11)
    hi all i want make one html page with 4~6 mp3 link i want users when click at mp3's link play
    at online player in page ! do you know how can do it that ? or do you know good music player in
    web (flash , MediaPlayer ) plz help me thanks dears....
  3. Making A Module For Personalized Google
    need XML/RSS help (2)
    I'm trying to do some basic stuff with RSS and XML, partially to make modules for personalized
    Google , but mostly to get experience with XML. I tried making one that would use the bash.org RSS
    feed ( http://www.bash.org/xml/about.html ) to get the last 3 quotes added, but I kind of just made
    something up and it didn't work: CODE <?xml version="1.0"
    encoding="UTF-8" ?> <Module> <ModulePrefs title="Bash: Lastest
    Quotes" height="100" /> <Content type="url"
    href="http://www.bash.or....
  4. Checking Size Of Web Pages
    and download weights (18)
    Do you have a method for measuring the 'size' of your web site to determine how fast or
    slow the site will load on various connections? Does it consider the values for the image and css
    files which have to follow along? And what sizes are considered acceptable? Thank you.....
  5. Would You Shop Using Your Cellphone
    online cellphone shopping cart (10)
    I was wondering if i should try implimenting an online shopping cart that's wap compatible. I
    mean would anyone here every use they're cellphones to buy stuff online? Need opinions.round....
  6. Google Pagerank In Tour Web
    SEO tools scripts (0)
    QUOTE Add the Future PageRank to your site To embed the Future PageRank within your site, just
    cut and paste the HTML code snippet below into your web page. Simply click in the text box below.
    The code will highlight. Copy with Alt-C (Command-C for Macintosh). Then paste into your site's
    code. The table has a width of 345 pixels CODE <!-- BEGIN Developer Shed™ Network's
    Future PageRank --> <!-- Copyright 2005 Developer Shed™, Inc. All Rights Reserved
    --> <table border="0" cellspacing="0" cellpadding="0&....
  7. Where Can I Learn Xml Online?
    (3)
    i have experience in XHTML, CSS, and PHP (and a *little* bit of Javascript), and i think XML looks
    very interesting. i looked at the tutorial on w3schools.com, but i know its out-of-date, and it
    also just doesn't look very advanced at all. i learned javascript from w3schools and i know that
    i still can't accomplish a percentage of javascript! so where can i learn XML for real ?....
  8. Online Bots - Virtual Bartender
    Online Bots - virtual bartender (3)
    Been looking into bots a little bit - some are really good, with lots of answers to questions, etc.
    This one is great - unique, it doens't respond with words, but with graphics.
    http://www.virtualbartender.beer.com/beer_usa.htm If anyone has some good bot websites, please
    post .......

    1. Looking for google, module, checking, aim, online, status, ajaxish

Searching Video's for google, module, checking, aim, online, status, ajaxish
advertisement



Google Module For Checking Aim Online Status - AJAXish but not really I think



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE