I am using the following Java Applet to get the full file path of a file that is to be uploaded: SVN LittleShoot.
The thing is, the applet is initialized and it seems to be running in IE6 – but when I call one of the functions from JavaScript to the applet to open the file dialog box the browser crashes and closes itself just the dialog because shows up.
Why is the case? How can I debug this, I don’t have any log files to look at? What may be the cause – I am willing to take wild guesses here as I am desperate!
HTML Usage (removed JS):
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" id="LittleShootApplet" name="LittleShootApplet" width="0" height="0">
<PARAM name="code" value="LittleShootApplet" />
<PARAM name="scriptable" value="true" />
<PARAM name="mayscript" value="true" />
<PARAM name="style" value="xdisplay: none; width:0; height:0; padding:0; margin:0;" />
</OBJECT>
Update
I get this error now: “Object doesn’t support this property or method.” I think its talking about this line.
<input type="button" value="Browse.." onclick="document.LittleShootApplet.openDialog('onFileDialogFile', 'onFileDialogCancel');">
Using just the HTML version, I get a JS error!
What happens if you put in some test calls from within the Applet itself: to make the same call that the JS calls hook into ? Does this also crash ?
If it doesn’t crash, then I would say you have found a bug in the browser itself (or ‘LiveConnect’ – whatever the kids are calling Java<->JS communication these days..)
If that it is the case, I would suggest the following:
Simplify the Applet, so that it contains the minimum amount of code in order that it crashes: same goes for the JSScript.
Get it to crash – then your stuck with debugging a Windows program I think:
http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx