Click here to Skip to main content
11,638,881 members (69,319 online)
Click here to Skip to main content

Incorporating Yahoo! Messenger into your website

, 27 Mar 2005 263.6K 42
Rate this:
Please Sign up or sign in to vote.
To see if a Yahoo! user is online or not... and send a message to this user via web...

Sample Image

Introduction

Have you ever heard of Yahoo! Messenger? If you have a website, and you want your users to contact you by a Yahoo! nickname, your users can send you an instant message by clicking on an icon on your website. You website will check if you are online or not to view the exact icons, then the users know your status.

Do you think it is interesting? If yes, please take a look over this article. I hope it is helpful for you and your website.

Using the code

I assume that you are in the intermediate level, so you know how to create an HTML website with HTML tags.

At first, I will show you how to create a hyperlink that users can use to send an instant message to the defined user using Yahoo! Messenger. It is very simple, you create a hyperlink with <a> tag with the 'href' attribute in the form 'ymsgr:sendim?userID'. For example:

<a href = 'ymsgr:sendim?novavnu'>Send me a message</a>

In this example, when the user clicks on the hyperlink, a new Yahoo! Messenger chat window will appear for the user to send a message to the defined user, in this example the user is novavnu. You can put your user ID instead of novavnu. The result looks like in the picture below:

If you use this code:

<a href = 'ymsgr:sendim?novavnu&m=hello+my+friend'>Send me a message</a>

The users don't need to type the message because the message is by default represented by the 'm' attribute value. Notice that if your message has spaces, you have to represent each space by the character '+'.

Now, you know how to let users send an instant message to you. But, there is a problem, how do the users know that if you are online or not? Remember, when you use Yahoo! Messenger, there is a small icon for you to know if the user is online or not. Why don't you use this icon like Yahoo! Messenger. Don't worry how to know if the user is online or not, because Yahoo! will do this for you, all you have to do is get the result from Yahoo! website and show the icon.

<a href = 'ymsgr:sendim?novavnu'>
  <img src="http://opi.yahoo.com/online?u=YourID&m=g&t=StyleID" border=0>
</a>

In this example, you use an <img> tag to view the picture from the result of Yahoo! website. You have two attributes in the Yahoo! website link. The first attribute is 'u', you replace YourID by your Yahoo! ID. The second attribute is 't', you replace StyleID by a number from 1 to 3, this is the style of the picture. Yahoo! gives you three styles as in the picture below. I give you six pictures, the first three pictures are for users who are online and the last three pictures are for users who are offline.

Conclusion

In this article, I showed you how to use Yahoo! icon in your website to show if the defined user is online or not. It is helpful when your website wants people to contact you by Yahoo! Messenger easily. If you have any comments or advice, please email me to improve this article.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Thang T.
Software Developer (Senior)
Vietnam Vietnam
I've been working as a freelance iOS developer since the invention of the original iPhone. After numbers of projects, I gain more and more experience, get familiar with popular 3rd-party libraries which can save time and cost in the development.

With the experiences gained by working on projects, I proudly offer consultancy service which supports my customers to (1) get the best way to develop their apps; (2) start up iOS apps business professionally & effectively.

My day starts with the practices Japanese traditional Martial Arts: Kendo (http://bit.ly/18gJm5) & Iaido (http://bit.ly/atyeSB). Therefore, I always work with Samurai Spirit in the entire day, no FEAR and willing to take CHALLENGES!

If you need to get your iOS games or apps done, I'm available at oDesk!

You may also be interested in...

Comments and Discussions

 
QuestionHow to add yahoo messenger to my wpf applications ? Pin
kalsa17-Feb-14 0:39
memberkalsa17-Feb-14 0:39 
QuestionNeed help from you regarding my final year project,,,,,,,,,,!!!!!!!! Pin
Prityush Deb29-Jun-12 18:25
memberPrityush Deb29-Jun-12 18:25 
GeneralMy vote of 1 Pin
Member 829752224-Nov-11 1:47
memberMember 829752224-Nov-11 1:47 
QuestionIncorporating Yahoo! Messenger into your website Pin
ALexander Cady15-Sep-11 8:46
memberALexander Cady15-Sep-11 8:46 
GeneralMy vote of 1 Pin
doihensuke10-Nov-10 17:02
memberdoihensuke10-Nov-10 17:02 
GeneralYM SMS Pin
jaka konde30-May-10 19:58
memberjaka konde30-May-10 19:58 
QuestionHow to check Invisible yahoo user Status Pin
Rizwan Ahmed8-Apr-10 1:05
memberRizwan Ahmed8-Apr-10 1:05 
Generalenable multiple users Pin
flazzup19-Mar-10 17:11
memberflazzup19-Mar-10 17:11 
GeneralInvisible status Pin
Mahdi Manavi11-Feb-09 9:00
memberMahdi Manavi11-Feb-09 9:00 
GeneralRe: Invisible status Pin
yayiharish19-Jun-09 20:02
memberyayiharish19-Jun-09 20:02 
Generalspecial thanks Pin
Ali (X)7-Nov-08 2:15
memberAli (X)7-Nov-08 2:15 
GeneralThanks Pin
Yulianto.16-Apr-07 20:31
memberYulianto.16-Apr-07 20:31 
Questionwhere can i download Incorporating yahoo ? Pin
Ntajneeb6-Apr-07 16:15
memberNtajneeb6-Apr-07 16:15 
AnswerRe: where can i download Incorporating yahoo ? Pin
crystvn18-Jul-07 20:45
membercrystvn18-Jul-07 20:45 
Generalym installed Pin
marquoc28-Mar-07 4:39
membermarquoc28-Mar-07 4:39 
Generalon line problem.. [modified] Pin
perhentianboy14-Mar-07 14:29
memberperhentianboy14-Mar-07 14:29 
GeneralSend me a message Pin
Kedar V18-Jan-07 18:25
memberKedar V18-Jan-07 18:25 
QuestionCan this be incorporated with Trillian? Pin
KDawg4421-Nov-06 3:15
memberKDawg4421-Nov-06 3:15 
Generalsome questions Pin
Sw Jiten21-Aug-06 16:13
memberSw Jiten21-Aug-06 16:13 
Generalfor blog Pin
seli282719-Aug-06 5:16
memberseli282719-Aug-06 5:16 
GeneralWe can do a command like that Pin
vietdoorgroup20-Jul-06 2:29
membervietdoorgroup20-Jul-06 2:29 
Generalrefresh icon status Pin
yyhhcc27-Nov-05 7:54
memberyyhhcc27-Nov-05 7:54 
Generalgreat article Pin
Anonymous22-Oct-05 9:56
sussAnonymous22-Oct-05 9:56 
QuestionYahoo icon Pin
Anonymous12-Oct-05 18:16
sussAnonymous12-Oct-05 18:16 
AnswerRe: Yahoo icon Pin
Thang Q. Tran12-Oct-05 18:42
memberThang Q. Tran12-Oct-05 18:42 
Generalyahoo messenger client Pin
Anonymous8-Oct-05 18:58
sussAnonymous8-Oct-05 18:58 
GeneralIM Message Window Pin
WVB8-Sep-05 7:32
memberWVB8-Sep-05 7:32 
GeneralRe: IM Message Window Pin
Thang Q. Tran8-Sep-05 15:02
memberThang Q. Tran8-Sep-05 15:02 
Generalhtml code in yahoo msg Pin
Anonymous28-Jul-05 4:41
sussAnonymous28-Jul-05 4:41 
GeneralRe: html code in yahoo msg Pin
Thang Q. Tran28-Jul-05 14:49
memberThang Q. Tran28-Jul-05 14:49 
GeneralThanks a lot! but I have a question... Pin
zhusq14-Jul-05 15:18
memberzhusq14-Jul-05 15:18 
GeneralRe: Thanks a lot! but I have a question... Pin
Thang Q. Tran15-Jul-05 1:24
memberThang Q. Tran15-Jul-05 1:24 
GeneralRe: Thanks a lot! but I have a question... Pin
Anonymous30-Sep-05 17:17
sussAnonymous30-Sep-05 17:17 
GeneralRe: Thanks a lot! but I have a question... Pin
zhusq8-Oct-05 14:30
memberzhusq8-Oct-05 14:30 
GeneralThanks! Pin
wmeoko20-Apr-05 11:49
susswmeoko20-Apr-05 11:49 
GeneralRe: Thanks! Pin
Raymond Tran20-Apr-05 16:29
memberRaymond Tran20-Apr-05 16:29 
GeneralThanks Pin
FJK4-Apr-05 20:33
memberFJK4-Apr-05 20:33 
GeneralRe: Thanks Pin
Raymond Tran5-Apr-05 2:16
memberRaymond Tran5-Apr-05 2:16 
GeneralRe: Thanks Pin
rbheart7-Apr-05 21:15
memberrbheart7-Apr-05 21:15 
GeneralRe: Thanks Pin
Anonymous22-Oct-05 9:59
sussAnonymous22-Oct-05 9:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150728.1 | Last Updated 28 Mar 2005
Article Copyright 2005 by Thang T.
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid