NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Launch MSN Messenger from your web page - Updated

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
7 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 07-30-2003, 09:49 AM THREAD STARTER               #1 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



Launch MSN Messenger from your web page - Updated


<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("you@youre mail.com")>you@youremail.com</a>
</body>
</html>

I think this will only worth with internet explorer.
deadserious is offline  
Old 11-23-2003, 07:20 PM   #2 (permalink)
New Member
Join Date: Nov 2003
Posts: 8
CrazyDog1 is an unknown quantity at this point
 



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>
&nbsp;&nbsp;<a id="lll" href=javascript:MsgrApp.LaunchIMUI("$msn")>Chat</a>";
}
...I dont think thats wrong, but it could be.
????: NamePros.com http://www.namepros.com/code/15076-launch-msn-messenger-your-web-page.html

Any ideas?

[edit]Screen strech
CrazyDog1 is offline  
Old 11-23-2003, 08:41 PM THREAD STARTER               #3 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



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.
????: NamePros.com http://www.namepros.com/showthread.php?t=15076

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("you@youre mail.com")>you@youremail.com</a>



Also, above in your code you have "<a href=java script" it should be all one word <a href="javascript">
deadserious is offline  
Old 11-23-2003, 08:51 PM   #4 (permalink)
New Member
Join Date: Nov 2003
Posts: 8
CrazyDog1 is an unknown quantity at this point
 



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:
????: NamePros.com http://www.namepros.com/showthread.php?t=15076
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.
CrazyDog1 is offline  
Old 11-23-2003, 08:55 PM THREAD STARTER               #5 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



Change the link so it looks like:

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

There shouldn't be any space after vbscript.

EDIT, I just realized you said the spaces in the code aren't by you. Hrmm, I'm not sure, what version of IE and msn are you using?
deadserious is offline  
Old 11-23-2003, 08:56 PM   #6 (permalink)
New Member
Join Date: Nov 2003
Posts: 8
CrazyDog1 is an unknown quantity at this point
 



It something in the bbcode. There is no space.

actual is:
<a href=VBScript:IMessenger.InstantMessage("$msn")>MS N</a>
CrazyDog1 is offline  
Old 11-23-2003, 08:58 PM THREAD STARTER               #7 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



Quote:
Originally posted by CrazyDog1
????: NamePros.com http://www.namepros.com/showthread.php?t=15076
It something in the bbcode. There is no space.

actual is:
<a href=VBScript:IMessenger.InstantMessage("$msn")>MS N</a>
Yea, see my edit above I realized that just after I replied.

You are making sure $msn is populated as an email address?
deadserious is offline  
Old 11-23-2003, 09:00 PM   #8 (permalink)
New Member
Join Date: Nov 2003
Posts: 8
CrazyDog1 is an unknown quantity at this point
 



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.
CrazyDog1 is offline  
Old 11-23-2003, 09:08 PM   #9 (permalink)
New Member
Join Date: Nov 2003
Posts: 8
CrazyDog1 is an unknown quantity at this point
 



http://agl.enterthecore.com/modules.php?name=Teamlist
CrazyDog1 is offline  
Old 11-23-2003, 09:13 PM THREAD STARTER               #10 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



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.
deadserious is offline  
Old 11-23-2003, 09:21 PM   #11 (permalink)
New Member
Join Date: Nov 2003
Posts: 8
CrazyDog1 is an unknown quantity at this point
 



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.
CrazyDog1 is offline  
Old 11-23-2003, 09:32 PM THREAD STARTER               #12 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



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.
deadserious is offline  
Old 11-24-2003, 03:42 AM   #13 (permalink)
NamePros Member
 
Mp)Tarh's Avatar
Join Date: Aug 2003
Location: Ontario, Canada
Posts: 98
Mp)Tarh is an unknown quantity at this point
 



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.
__________________
Yeah... I knew that. What?
Mp)Tarh is offline  
Old 11-24-2003, 05:54 PM   #14 (permalink)
New Member
Join Date: Nov 2003
Posts: 8
CrazyDog1 is an unknown quantity at this point
 



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]).
????: NamePros.com http://www.namepros.com/showthread.php?t=15076

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.
CrazyDog1 is offline  
Old 11-24-2003, 06:46 PM   #15 (permalink)
New Member
Join Date: Nov 2003
Posts: 8
CrazyDog1 is an unknown quantity at this point
 



SOLVED!

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

Thanks for helping out, both of you
CrazyDog1 is offline  
Old 12-15-2003, 09:29 AM   #16 (permalink)
New Member
Join Date: Nov 2003
Posts: 14
Matrixs is an unknown quantity at this point
 



Re: Launch MSN Messenger from your web page - Updated


Quote:
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>
????: NamePros.com http://www.namepros.com/showthread.php?t=15076
<a href=VBScript:IMessenger.InstantMessage("you@youre mail.com")>you@youremail.com</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.
__________________
Follow the white rabbit the Matrixs has you
Matrixs is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:24 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger