Javascript eventsJavascript eventsHi,
I would like to use JBatchUpload in my ASP.NET web page. For that, I would like to know if there is a way to have events in javascipt in order to detect for example when one file has completed uploading and when the whole batch is done. For example, I would like to process the files one by one as they are sent. I think this is done by specifying a URL in the parameter url. But then, once all the batch has been completed, I need to perform a special postback to display the results on screen. In fact, it would be like simulating a button click and then in the code-behind, I would handle the event of the click. My question is basically: can I have a javascript method called when the batch is done? Thanks, Talal Re: Javascript eventsAnswer is Yes with JSAPI:
http://www.jfileupload.com/products/tools/index.html Install JBatchUpload over JSAPI and you will have the following JavaScript callbacks: Code: Select all
Re: Javascript eventsYes, I figured it thanks!
I am now trying to integrate the control into one of my pages. I need to add a parameter to the call of the upload URL. How could I do that with the javascript code? I tried getting rid of the javascript code by inserting directly the object tag and applet tag into the ASPX html code. but as soon as i hit upload, it hangs. nothing happens. I am sure it's because of my transformation of the code because I have used for testing, the page that you provide as an example, except that I replace the script call to the JS page, by the direct declaration. Why is this an issue? am I missing something? do you have an example of such a declaration without javascript? I am using WeakSSL and JSAPI. The code that I have is the following: Code: Select all
Talal Re: Javascript eventsHi again,
I managed to make the javascript work as it is given in the example. I would like to know how I can modify the buttons (select, start, cancel) I would like to disable the select and start when the user clicks on cancel. So in general, how do we work with the controls in the applet? Thanks, Talal Re: Javascript eventsYou can customize the UI thanks to i18n_pane.properties and i18n_bar.properties text files. You have a tutorial at:
http://www.jfileupload.com/products/jfi ... ation.html Is it enough to do what you need ? Re: Javascript eventsThanks, I was already looking at these files but none of my changes (even small ones, like text change) were not working. I will have a look again at it today maybe it was a problem of cache or something.
I have deployed my website on the test server and I keep getting error 302 after the first upload finishes. I thought it was due to the integration I made of the java control into one of my pages, so I tried using the provided applet_http_aspx.html file, with some modification to user weakssl and jsapi, but still the same problem happens. Also, we have bought the jfileupload and the jbatchupload. I copied the corresponding jars of each zip file and overwrote the one I was using from the demo project. but I still keep getting "unregistered" in the control. Is there something else I have to do to make this work? we need to release the project onto the client's server and we cannot do so with "unregistered". Weird as it may seem, I am not getting error 302 on the client's server! Only on our test server. Any quick help is much appreciated. Thanks, Talal Re: Javascript eventsHi again,
I am now able to make the registered jars work without the jsapi. This is what I have done: I created a new webfolder. I first copied the jfileupload files in int (registered) and tested, it worked fine, the applet appears. I have added the batch upload from the package that we bought yesterday and it also worked. After that, I added weakssl.jar and tried accessing using https, and it worked well. Now, I copied the jsapi.jar and its html and js files into the webfolder and this is the error I get: java.lang.NoClassDefFoundError: jfileupload/transfer/client/core/N at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.defineClassHelper(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.access$100(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: jfileupload.transfer.client.core.N at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 19 more Caused by: java.io.IOException: open HTTP connection failed:http://localhost/newjfu/jfileupload/tra ... re/N.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 23 more Exception: java.lang.NoClassDefFoundError: jfileupload/transfer/client/core/N I don't get it. The exact same files in unregistered mode are working well in another web folder. I copied those files into the new folder that I created and i got the same error. How can the exact same files produce an error in one folder and no error in another folder?? I have checked the size, it's the same to the byte. thanks, Talal
Re: Javascript eventsI've sent you the Enterprise version of JSAPI, it should work now.
Re: Javascript eventsi am having a simular issue - the red unregistered message has gone but the blue one remains - is this due to the jsapi?
thanks, Josh Re: Javascript eventsNo, it's not because of JSAPI. Which license do you have ? Pro ? Do you have one license for each product ?
|