PDA

View Full Version : inserting JS in an outlook email


Code junkie
05-27-2004, 05:26 AM
Hi there,
Before anyone asks why I want to insert JS in an outlook email and questions my integrity I will explain!

I am going to be making the weekly bulletin for my company tomorrow and I wanted to insert some script that will open your cd drive. This is so outline the dangers of opening things or clicking on links from unknown senders.

The script I want to use is this:

<html>
<a href="#" onClick="openCDs()">Click me</a>

<script language="VBScript">
<!--
Function openCDs
Set mediaPlayer = CreateObject("WMPlayer.OCX.7" )
If mediaPlayer.cdromCollection.count >= 1 then
For i = 0 To mediaPlayer.cdromCollection.count - 1
Call mediaPlayer.cdromCollection.item(i).eject()
Next
End If
End Function
-->
</script>
</html>

Can anyone tell me how I can insert this code into an outlook email.

Thanks

Greg

Willy Duitt
05-27-2004, 06:59 AM
The critical update to patch that security hole was issued nearly a year ago. Therefore, that script will no longer work on anyone who is up to date on their critical updates. If it works for you. I suggest you get up to date. ;)