A window pops up and says "You've won a free cupholder would you like to accept?"
You click yes and your cd drive opens.
I've managed to get the operation to work in Internet Explorer(which is what we have to do) but I have one problem.
Since I've assigned the the alert.window to open the cd tray...I don't know how to customize the text.
Instead of it saying [object] I want it to say something else. Can anyone help me?
Here is this code, just copy it to a .txt and make it an html(only works with IE)
Code: Select all
<html>
<head>
<title>Free Cup Holder</title>
<script language="JavaScript" type="text/javascript">
<!--
function EjectAll(){ // Eject all CD-ROM drives
var col=Player.cdromCollection, c=0;
alert(col)
while(c<col.count)col.item(c++).eject();
}
//-->
</script>
</head>
<body onload="EjectAll()">
<OBJECT ID="Player"
CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
style="display:none" width="245" height="240">
</OBJECT>
</body>
</html>