This one might also be regarded as off topic, but as some you might  
be stuck with the same problem, I thought it might be worth to share.
The issue is that starting from firefox 3.0, when using an input file  
element in a form, you can't access to the full path of the file  
chosen by the user, even if it's fully displayed in the form. e.g. : / 
user/paul/3ert.pdb. From javascript, the file.value string would give  
you only the file name  (eg : 3ert.pdb).
I didn't find any way of getting the full path back. However one can  
now access to the whole file content directly from javascript, using  
the getAsText method. Coupled with the jmolLoadInline function, it  
allows to load any local file into the Jmol applet. For example I  
successfully used the following code :

<input type="file" id="loadname" size="20" onchange="jmolLoadInline 
(document.getElementById('loadname').files.item(0).getAsText(''));  
return false;">

It worked smoothly with any plain text file. It didn't work with a  
gzipped file, giving back a "unrecognized file format for file  
string" error message.

Paul

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to