| | |||||
| ||||||||
| 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. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() | 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. |
| |
| | #2 (permalink) |
| New Member Join Date: Nov 2003
Posts: 8
![]() | 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>";
} ????: NamePros.com http://www.namepros.com/code/15076-launch-msn-messenger-your-web-page.html Any ideas? [edit]Screen strech |
| |
| | THREAD STARTER #3 (permalink) |
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() | 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"> |
| |
| | #4 (permalink) |
| New Member Join Date: Nov 2003
Posts: 8
![]() | 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>";
} ????: 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. |
| |
| | THREAD STARTER #5 (permalink) |
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() | 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? |
| |
| | THREAD STARTER #7 (permalink) | ||||
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() |
![]() You are making sure $msn is populated as an email address? | ||||
| |
| | #11 (permalink) |
| New Member Join Date: Nov 2003
Posts: 8
![]() | 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. |
| |
| | #13 (permalink) |
| NamePros Member Join Date: Aug 2003 Location: Ontario, Canada
Posts: 98
![]() | 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? |
| |
| | #14 (permalink) |
| New Member Join Date: Nov 2003
Posts: 8
![]() | 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. |
| |
| | #16 (permalink) | ||||
| New Member Join Date: Nov 2003
Posts: 14
![]() | Re: Launch MSN Messenger from your web page - Updated
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 | ||||
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |