You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Sergey Podatelev <br...@gmail.com> on 2008/10/01 09:40:00 UTC

Multiple file upload javascript won't work when using XHTML1.1

Hello,

I have my HTML pages configured to be served as XML files, specifically, I
use XHTML1.1 Strict doctype in HTML files and I send a
"Content-type:application/xhtml+xml" header (for the browsers that support
that content-type, that in other words, non-IEs).

The problem is, on MultiFileUploadPage I got a javascript error saying
"Error: not a file input elemen".
This happens because in
org.apache.wicket.markup.html.form.upload.MultiFileUploadField.js @ line 64,
this check fails:

if( element.tagName == 'INPUT' && element.type == 'file' ){

This happens because in XML, element.tagName is 'input', not 'INPUT'.
Once I've corrected this, everything went back to normal.

If this isn't a bug, could someone please tell me, what is the best way to
override this javascript file?

Re: Multiple file upload javascript won't work when using XHTML1.1

Posted by Igor Vaynberg <ig...@gmail.com>.
looks like a bug, go ahead and open a jira issue

-igor

On Wed, Oct 1, 2008 at 12:40 AM, Sergey Podatelev
<br...@gmail.com> wrote:
> Hello,
>
> I have my HTML pages configured to be served as XML files, specifically, I
> use XHTML1.1 Strict doctype in HTML files and I send a
> "Content-type:application/xhtml+xml" header (for the browsers that support
> that content-type, that in other words, non-IEs).
>
> The problem is, on MultiFileUploadPage I got a javascript error saying
> "Error: not a file input elemen".
> This happens because in
> org.apache.wicket.markup.html.form.upload.MultiFileUploadField.js @ line 64,
> this check fails:
>
> if( element.tagName == 'INPUT' && element.type == 'file' ){
>
> This happens because in XML, element.tagName is 'input', not 'INPUT'.
> Once I've corrected this, everything went back to normal.
>
> If this isn't a bug, could someone please tell me, what is the best way to
> override this javascript file?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org