|
-
May 16th, 2007, 03:24 AM
#1
Thread Starter
Fanatic Member
[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,
-
May 16th, 2007, 10:04 AM
#2
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.
-
May 16th, 2007, 04:02 PM
#3
Thread Starter
Fanatic Member
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,
-
May 21st, 2007, 08:22 AM
#4
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.
-
May 21st, 2007, 08:32 AM
#5
Thread Starter
Fanatic Member
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,
-
May 23rd, 2007, 10:44 AM
#6
Re: messenger dynamic buttons
Show me. It may be possible to modify it to work with information coming from a database.
-
May 23rd, 2007, 02:58 PM
#7
Thread Starter
Fanatic Member
Re: messenger dynamic buttons
-
May 23rd, 2007, 03:57 PM
#8
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.
-
May 23rd, 2007, 04:12 PM
#9
Thread Starter
Fanatic Member
Re: messenger dynamic buttons
great!
any ideas how to send an initial message when clicking the skype button?
-
May 23rd, 2007, 04:18 PM
#10
Re: messenger dynamic buttons
I think it's pretty limited, this is as far as they've exposed.
-
May 23rd, 2007, 04:25 PM
#11
Thread Starter
Fanatic Member
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,
-
May 24th, 2007, 03:11 PM
#12
Re: messenger dynamic buttons
Most probably not. While getting a chat window open may be alright, impersonating a user may breach some privacy laws.
-
May 24th, 2007, 04:06 PM
#13
Thread Starter
Fanatic Member
Re: messenger dynamic buttons
-
May 24th, 2007, 04:11 PM
#14
Re: messenger dynamic buttons
So... all questions answered? If so, add resolved. I think this could be useful for future searchers.
-
May 25th, 2007, 12:44 AM
#15
Thread Starter
Fanatic Member
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,
-
May 29th, 2007, 03:58 PM
#16
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.
-
May 29th, 2007, 04:06 PM
#17
Thread Starter
Fanatic Member
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.
-
May 30th, 2007, 10:44 AM
#18
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|