Results 1 to 18 of 18

Thread: [RESOLVED] messenger dynamic buttons

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Resolved [RESOLVED] messenger dynamic buttons

    Hi,

    I have an asp.net website with sql server db.

    I have a table of customers, and a grid showing all the customers. I'd like to add an msn messenger button for each customer, so that clicking on this button will open up msn messenger and call this customer according to the field "messengerID" on my customers table.

    in addition, if possible I'd like that a certain message (based on the user details) will be automatically sent to the customer inside messenger when it opens up.

    I'd appreciate your help on this, also if it is not possible to do in msn messenger please advise what other communication service I can use to allow chat + voice talk between the user and the customer.

    thanks,

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: messenger dynamic buttons

    You'll need to generate dynamic hyperlinks that call a javascript method onclick. A commonly available code snippet for this is:

    Code:
    <object classid="clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28" codeType="application/x-oleobject" id="IMessenger">
    </object>
    <a href='javascript:IMessenger.InstantMessage("[email protected]");window.location.replace(window.location)'><b>Send MSN Message</b></a>
    I don't think you can actually get the message sent though unless there's some undocumented API in there. This code snippet requires MSN to be installed.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: messenger dynamic buttons

    thanks for that, I'll give it a try.

    do you have any idea how to use skype instead of msn messenger in the same way?

    thanks,

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: messenger dynamic buttons

    Never seen any code for launching skype. If you've seen it on any websites, you should be able to get the relevant code from there.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: messenger dynamic buttons

    there's a detailed info in skype website on how to create buttons for specific users ("static" buttons). but nothing about making bounded to db records.

    thanks,

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: messenger dynamic buttons

    Show me. It may be possible to modify it to work with information coming from a database.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: messenger dynamic buttons

    here's the link: http://www.skype.com/share/buttons/

    thanks,

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: messenger dynamic buttons

    Code:
    <!--
    Skype 'Skype Me™!' button
    http://www.skype.com/go/skypebuttons
    -->
    <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>
    <a href="skype:abcdefg?call"><img src="http://download.skype.com/share/skypebuttons/buttons/call_green_white_92x82.png" style="border: none;" width="92" height="82" alt="Skype Me™!" /></a>
    Very simple. All you need is a hyperlink, and you set its NavigateUrl property from the codebehind. Since it's from the codebehind, you get the value from a database.

    The rest of the code there is rather static and you can simply stick it on the page. Just replace the <a> element with a server side hyperlink control.

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: messenger dynamic buttons

    great!

    any ideas how to send an initial message when clicking the skype button?

  10. #10
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: messenger dynamic buttons

    I think it's pretty limited, this is as far as they've exposed.

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: messenger dynamic buttons

    thanks again, I wonder if its possible at all on skype, or on any other messenger...

    I can't add to your rating (I must spread some before)

    thanks,

  12. #12
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: messenger dynamic buttons

    Most probably not. While getting a chat window open may be alright, impersonating a user may breach some privacy laws.

  13. #13

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: messenger dynamic buttons

    I see, thanks.

  14. #14
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: messenger dynamic buttons

    So... all questions answered? If so, add resolved. I think this could be useful for future searchers.

  15. #15

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: [RESOLVED] messenger dynamic buttons

    I was hoping someone could find a fix for sending an initial message, but I guess its not possible.

    thanks,

  16. #16
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [RESOLVED] messenger dynamic buttons

    There is another route you can investigate. Though it's not exactly the best solution.

    You may have seen certain web based messengers.

    Using certain web based APIs, you could actually get the user to login by giving his credentials, and then it may be possible for you to send a 'system' or even an impersonated message. I don't know how far you can go with that API, but it's an avenue you could explore.

  17. #17

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: [RESOLVED] messenger dynamic buttons

    yes, but that would require the other side to stay listening on this messenger, which doesn't fit to this project requirments.

  18. #18
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [RESOLVED] messenger dynamic buttons

    Those are all the options you have then.

    If you ever find a solution to go beyond this, do post it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width