Click to See Complete Forum and Search --> : AIM online status


obviousunknown
05-05-2003, 07:28 PM
there is a html code that will display two different images depending on if a user is signed on the AIM or signed off.
<img src="http://big.oscar.aol.com/screenname?on_url=image/online.gif&off_url=image/offline.gif">

Is there any way I could display two different messages in text instead / or as well as the images. I was thinking of a conditional statement based on the "src" of the image but I'm not too sure. If anyone could help, thanks.

brendandonhue
05-05-2003, 07:36 PM
Where did you get that code?
The script wouldn't be hard to write, but that status code doesn't seem to work at all. And I can't see how it would, as the images/online.gif and offline.gif aren't even at big.oscar.aol.com.

obviousunknown
05-05-2003, 07:39 PM
I got the code from aimfliez.com ...

this is the actual code: <img src="http://big.oscar.aol.com/obviousunknown?on_url=http://www.aimfilez.com/online.gif&off_url=http://www.aimfilez.com/offline.gif">

the images are from a url, but since I had them in the same directory, i left out the path.

brendandonhue
05-05-2003, 08:02 PM
Now it just shows offline whether I am or not.
Does it work properly for you? If yes Ill just write the script.

obviousunknown
05-05-2003, 08:36 PM
I don't know why that wouldn't work. It does for me at least. thanks for your effort.

I'm sure you put your screenname in there and all. Otherwise you got me.

brendandonhue
05-05-2003, 08:43 PM
Yes i did. I'll try to write the script anyway.

brendandonhue
05-05-2003, 08:51 PM
Got the AIM status working, but whether it shows online or not, the src attribute of the image is the same, so it doesn't tell you if the person is on or off.

Jona
05-05-2003, 09:08 PM
<script>
function check_online(){
if(document.images["online_offline"].src="http://www.aimfilez.com/online.gif"){
document.write("Online"); } else {
document.write("Offline");}
}
</script>
<img src="http://big.oscar.aol.com/obviousunknown?on_url=http://www.aimfilez.com/online.gif&off_url=http://www.aimfilez.com/offline.gif" name="online_offline"><br>
<script>
check_online();
</script>

Jona
05-05-2003, 09:09 PM
Note: The code I posted is invalid HTML and was only used in IE6.0 for testing purposes. You should use proper HTML 4.01 according to the W3C (http://w3.org/ ) standards.

obviousunknown
05-05-2003, 09:31 PM
I'm running IE6 and I've having trouble

1)the image only shows the url stated in the "if, else" conditional
2)the text seems to always show the first statment only no matter the online status.

maybe it's just my browser but thanks for all your support so far guys.
---

in another idea, is there any html code that uses the "src" command where you could maybe use this?

<??? src="http://big.oscar.aol.com/obviousunknown?on_url=javascript:document.write('Online')&off_url=javascript:document.write('Offline')">

or something of that sort.

obviousunknown
05-05-2003, 09:37 PM
okay, well fooling around, I've come across this that somewhat works.

<iframe src="http://big.oscar.aol.com/obviousunknown?on_url=http://www.yahoo.com&off_url=http://www.google.com">

obviously I could use two different html pages of my own with one saying online and one saying offline. I'll just use this then unless someone comes up with a better or simplier idea. Also, is there a way to display the contents of a seperate document using javascript? Just messing with ideas.

Thanks again all.

brendandonhue
05-06-2003, 05:36 PM
Looks like it only accepts an HTML file or an image, or maybe im not trying the right things.

It wont let me set on_url or off_url to a JS Function or .JS File.

Jona
05-06-2003, 10:20 PM
If anything, javascript:void(function) would work in it, but it is server-parsed and the server probably doesn't allow JS code to be parsed.