Re: [Xsltforms-support] Upload with Java Applet
Brought to you by:
alain-couthures
From: Alain C. <ala...@ag...> - 2012-06-13 20:46:29
|
Hello Javier, This is not allowed to modify the value of an input with type="file". There is a possible workaround with z-index and another input field (http://www.quirksmode.org/dom/inputfile.html). Is it what you want? Thanks! -Alain Le 13/06/2012 11:36, Javier Díaz a écrit : > Hello, > > I have tested upload control with applet in Explorer and it works > great, but people complain that when any file is selected, in contrast > of FileRead API version, it doesn't appear the file name of uploaded > file in upload control and it seems no file has been chosen yet. > > I have tried to fix it but I couldn't. Is it posible to make it work > or at least put an xxxx in upload control to make clear that some file > has been chosen? > > Many thanks, > Javier > > El 12/06/12 20:18, Javier Díaz escribió: >> Hello, >> >> In order to test my web with IE, I installed a virtual machine to test it. >> >> When testing upload control, it didn't work, it didn't load the applet, >> but no error message appeared. >> >> Another person tested it and I realized I hadn't java installed in my >> virtual machine. >> >> The only problem with IE8 and Java is that it doesn't appear a clear >> error that says to you that you need Java to use the web. Instead, it >> appear a javascript error in IE that people don't pay attention to it. >> >> I have done this change in my xsltforms version in order to make clear >> that Java is not installed: >> >> >> if (document.applets.xsltforms) { >> return document.applets.xsltforms.readFile(fname, >> encoding, xsdtype, title) || ""; >> } else { >> - if( document.getElementById("xsltforms_applet") ) { >> + if( document.getElementById("xsltforms_applet")&& >> (typeof document.getElementById("xsltforms_applet").readFile != >> 'undefined')) { >> return >> document.getElementById("xsltforms_applet").readFile(fname, encoding, >> xsdtype, title) || ""; >> } else { >> XsltForms_browser.loadapplet(); >> if (document.applets.xsltforms) { >> return >> document.applets.xsltforms.readFile(fname, encoding, xsdtype, title) || ""; >> } else { >> - if( >> document.getElementById("xsltforms_applet") ) { >> + if( >> document.getElementById("xsltforms_applet")&& (typeof >> document.getElementById("xsltforms_applet").readFile != 'undefined')) { >> return >> document.getElementById("xsltforms_applet").readFile(fname, encoding, >> xsdtype, title) || ""; >> + } else { >> + alert("Error: Java no está >> habilitado. Es necesario Java para subir ficheros en Internet Explorer"); >> } >> } >> } >> >> (Alert message is intentionally in Spanish, because is an internal web) >> >> I hope it is useful to anybody. >> >> Best Regards, >> Javier >> >> PS: >> |