Javascript event

Image previewer add-on.
Post Reply
bigeagle
Posts: 10
Joined: Sat Nov 01, 2008 5:54 pm

Javascript event

Post by bigeagle »

Hi,

A question about the clientside. Is it possible to trigger a Javascript event after completion?
So, now you can configure a forward url which will be launched after that all images are uploaded.
But is it also possible to trigger a Javascript event after that al images are uploaded?
So yes, how?

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Javascript event

Post by support »

Yes, you need JSAPI add-on (free). It includes more than 10 JavaScript callbacks including JSTranferDone(...) you need: http://www.jfileupload.com/products/tools/index.html

To install it, start from the JSAPI HTML/JavaScript samples provide with the add-on and then copy/paste applet parameters from JImageUpload&JFileUpload. Pay attention to ARCHIVE parameters (that must include all JAR files) and MAYSCRIPT which is required.

Does it help ?

bigeagle
Posts: 10
Joined: Sat Nov 01, 2008 5:54 pm

Re: Javascript event

Post by bigeagle »

Ok, thks but de default html which I've downloaded isn't working.
Wenn you go to [cut]
you see the common jsapi.html file were I only changed the URL but the applet isn't still working.

I've copied the jsapi.jar into the lib folder.
Last edited by bigeagle on Fri Dec 05, 2008 10:36 am, edited 2 times in total.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Javascript event

Post by support »

You're using JFileUpload 2.1 with JSAPI 2.2. Please download JFileUpload 2.2, update the JAR files and try again.

bigeagle
Posts: 10
Joined: Sat Nov 01, 2008 5:54 pm

Re: Javascript event

Post by bigeagle »

You're the best 8-)

Thank you

bogdanovich
Posts: 3
Joined: Sat Sep 05, 2009 1:07 am

Re: Javascript event

Post by bogdanovich »

I've been trying to use it with JBatchUpload - no go. Is there a way?

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Javascript event

Post by support »

Do you have any error or ? Does the HTML sample that comes in JSAPI work?

bogdanovich
Posts: 3
Joined: Sat Sep 05, 2009 1:07 am

Re: Javascript event

Post by bogdanovich »

No, not even an error message. But now it's a little more clear:

1) getFilenames() doesn't exist in JBatchUpload. I have looked at the sources, there is simply no implementation.
2) Callbacks didn't work on my workstation, but worked on a different system, so it's my system that's slightly messed up :(

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Javascript event

Post by support »

getFilenames() implementation is in JFileUpload. JBatchUpload and JFileUpload share the parent applet so getFilenames() should work once uploaded has been started.

Which JRE version do you have? 1.6.0._15? How are you testing on your workstation?
Are you using something like http://localhost/something/applet.html

It seems there is a problem with 1.6.0._15 for localhost and new plugin generation.

Post Reply