NameSilo

Launch MSN Messenger from your web page - Updated

Spaceship
Watch
Impact
6
<html>
<body>
<OBJECT classid=clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28
codeType=application/x-oleobject id=IMessenger width=0 height=0"></OBJECT>
<a href=VBScript:IMessenger.InstantMessage("[email protected]")>[email protected]</a>
</body>
</html>

I think this will only worth with internet explorer.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
This code is not working. Do I need the javascript source?
Here is the snippent that I am using in PHP.

Code:
$msn = $row["msn"];
if ($msn == "") {
$msnlink = "n/a";
}
else {
?>
<object classid="clsid:F3A614DC-ABE0-11d2-A441-00C04F795683" codebase="#Version=2,0,0,83" 
codetype=application/x-oleobject id=MsgrObj width=0 height=0></object>
<OBJECT classid="clsid:FB7199AB-79BF-11d2-8D94-0000F875C541" 
codeType=application/x-oleobject id=MsgrApp width=0 height=0></OBJECT>
<?php
$msnlink = "<a href=javascript:MsgrApp.LaunchAddContactUI("$msn")>Buddy</a>
  <a id="lll" href=javascript:MsgrApp.LaunchIMUI("$msn")>Chat</a>";
}

...I dont think thats wrong, but it could be.

Any ideas?

[edit]Screen strech
 
0
•••
I'm not sure about launching the buddy list anymore. I know it was once possible, but I don't know how or if it's possible anymore. If I ever figure it out I'll be sure to reply here and let you know though. :)

For just launching msn to chat, this should work:

<OBJECT classid=clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28
codeType=application/x-oleobject id=IMessenger width=0 height=0></OBJECT>
<a href=VBScript:IMessenger.InstantMessage("[email protected]")>[email protected]</a>



Also, above in your code you have "<a href=java script" it should be all one word <a href="javascript">
 
0
•••
Ok, changed to:
Code:
$msn = $row["msn"];
if ($msn == "") {
$msnlink = "n/a";
}
else {
?>
<OBJECT classid=clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28 
codeType=application/x-oleobject id=IMessenger width=0 height=0></OBJECT>
<?php
$msnlink = "<a href=VBScript:IMessenger.InstantMessage("$msn")>MSN</a>";
}

Error:
Object doesn't support this property or method:
'IMessenger.InstantMessage'

The spaces in the code are not by me... must be from copy & paste. They are/were not in the actual file.
 
0
•••
Change the link so it looks like:

<a href=vbscript:IMessenger.InstantMessage("$msn")>MSN</a>

There shouldn't be any space after vbscript.

EDIT, I just realized you said the spaces in the code aren't by you. :D Hrmm, I'm not sure, what version of IE and msn are you using?
 
0
•••
It something in the bbcode. There is no space.

actual is:
<a href=VBScript:IMessenger.InstantMessage("$msn")>MSN</a>
 
0
•••
Originally posted by CrazyDog1
It something in the bbcode. There is no space.

actual is:
<a href=VBScript:IMessenger.InstantMessage("$msn")>MSN</a>

Yea, see my edit above I realized that just after I replied. :D

You are making sure $msn is populated as an email address?
 
0
•••
Yes, when you mouse over the link, it shows the proper e-mail addy.

When I attempted to hard code it, I still get the error icon; and no action performed.
 
0
•••
0
•••
You have multiple occurences of the <object> code, try removing all of them except for the one I listed above and see if that makes a difference.
 
0
•••
Ok, by moving the object class BEFORE the table started, I was able to get it to work. Very nice thank you.

However, there is a bug... if you click on the link, the page turns white (you lose the source page) and this message appears:
[OBJECT]

But, the IM box appears.
 
0
•••
Yes I'm not sure how to get rid of that at the moment, but if I find a solution I'll be sure to reply here and let you know. :)
 
0
•••
I've had that problem multiple times, mostly when I use window.open.

To fix it, put the following in your javascript command:

<a HREF="javascript:mycommand;window.location.replace(window.location);">

where "mycommand" is is your javascript statement.
 
0
•••
I dont understand. If this is a VBscript, why would I use a javascript to replace the window? Im not real sure how VBscript works as of yet...

I looked into the possibly creating a new pop-up box via javascript, but that would entail calling a new file for the javascript.

Lets say I created a new HTML file to call the MSN obeject.

How would I grab the user name from link I clicked, and place it into the html file? Would I have to write a whole new function to create the HTML file, or could it be easier?

Once the javascript loads, launches the HTML, how do you get it to auto close so that the user does not even know that he/she just opened a new link? I looked for that command, but since I couldnt find it, I halted the whole idea behind using a javascript pop-up to launch the messenger box. I want to keep the user on the page they are on when they click the MSN link (not [object]).

I also noted that if you click on MSN link, and you are displayed [object] page, then you click on the back link; The source page drops the <object>, rendering the next MSN link you click containing an error...

I think I am going to try to code a javascript that automatically goes back to source page and refreshes itself. Dont know yet if this is possible, but I will try.
 
0
•••
SOLVED!

$msnlink = "<a href=javaScript:IMessenger.InstantMessage("$msn");window.location.replace(window.location)>Send MSN</a>";

Thanks for helping out, both of you ;)
 
0
•••
Re: Launch MSN Messenger from your web page - Updated

Originally posted by deadserious
<html>
<body>
<OBJECT classid=clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28
codeType=application/x-oleobject id=IMessenger width=0 height=0"></OBJECT>
<a href=VBScript:IMessenger.InstantMessage("[email protected]")>[email protected]</a>
</body>
</html>

I think this will only worth with internet explorer.

Hi deadserious

Thanks fore the code I would never had come up with an idea like that 1> what i mite do is use that code do up some drawing later in the week because i'm in the progess of do an online store in frontpage but will be reformed in NotePad.
;)
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back