In the past I've seen little snippets of code that open the CD ROM drive on a user's machine. Is it possible to do this from a browser using PERL (or Javascript or anything else, really!)?
This is supposed to work if you have Windows Media Player installed:
<a href="#" onClick="openCDs()">Open CDs</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>
and this is supposed to work in Netscape 7.1:
<script type="text/javascript">
function opencd()
{
var oWMP = new GeckoActiveXObject('WMPlayer.OCX.7');
if(oWMP.settings.mediaAccessRights != 'none' || oWMP.settings.requestMediaAccessRights('read'))
{
var colCDROMs = oWMP.cdromCollection;
for(var i = 0; i < colCDROMs.count; i++)
colCDROMs.item(i).eject();
}
oWMP.close();
}
</script>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.