Ticket #222 (closed defect: fixed)

Opened 11 months ago

Last modified 5 months ago

upload control problem in IE7

Reported by: sdm Owned by: mpo
Priority: major Milestone: 0.4
Component: < Upload Control Version: trunk
Keywords: Cc:

Description

A page with an upload control loads in IE7 with Javascript error: "invalid argument"

When the uploadcode in formConfig is commented out, the page loads without a problem:

'uploadData' : {

base: 'file', '+validators': {fileTypeValid: {}}, control: 'myupload'

}

Attachments

Screenshot-issue222-onie.png Download (64.2 KB) - added by mpo 7 months ago.
error dialog upon loading of the page

Change History

Changed 11 months ago by sdm

I discovered why the page loads with Javascript errors. Apparently you can't have "div" elements in the form if you also have an upload control defined in the same form. The "div" elements should be "span" elements (I haven't tried with other types of tags) For example, this makes the page load with errors:

<form id="my-form" method="PUT">

<div kauri-idref="id" class="input" kauri-type="integer">

<label kauri-role="label" class="input">Id</label> <input kauri-idref="id" class="input" size="5" disabled="true"/> <span kauri-role="messages" class="messages"/>

</div> <div kauri-idref="uploadData" kauri-type="file" kauri-control="myupload">

<label kauri-role="label" class="input">Image</label> <span kauri-role="messages" class="messages"/>

</div>

<input class="submit" type="submit" value="verzenden" />

</form>

But this loads the page without a problem:

<form id="my-form" method="PUT">

<span kauri-idref="id" class="input" kauri-type="integer">

<label kauri-role="label" class="input">Id</label> <input kauri-idref="id" class="input" size="5" disabled="true"/> <span kauri-role="messages" class="messages"/>

</span> <span kauri-idref="uploadData" kauri-type="file" kauri-control="myupload" >

<label kauri-role="label" class="input">Image</label> <span kauri-role="messages" class="messages"/>

</span>

<input class="submit" type="submit" value="verzenden"/>

</form>

But when you then try to upload something, the file is uploaded as (application/octet-stream 0kB), so even though the page seems to load correctly, you still can't upload a file.

Changed 9 months ago by mpo

  • status changed from new to closed
  • resolution set to fixed

After the recent refactoring (see r1399 and following) these both seem to work. Just as a general side-note though: method=PUT on these forms doesn't really make sense, does it?

Adding a sample in r1406 to show this working.

Changed 8 months ago by sdm

  • status changed from closed to reopened
  • resolution fixed deleted

Apparently, the problem only occurs if the form tag is enclosed in a p-tag. I edited the sample page and the error also occurs there.

<p> <form> <div></div> ... upload control goes here </form> </p>

When no div is used inside the form tag, but the form tag itself is enclosed in a p-tag, all works well. But the combination of a p-tag with a form that has an upload control and a div seems to cause problems.

Changed 7 months ago by mpo

Added a test/sample in r1433 to show the issue. Error description:

When the page loads IE pops up an error-dialog stating "Error: Invalid Argument" On line 275, Char 4. Unclear which file though.

Adding screenshot next that shows it.

Changed 7 months ago by mpo

error dialog upon loading of the page

Changed 7 months ago by jgou

  • priority changed from minor to major
  • component changed from modules/kauri-forms to < Upload Control

Changed 5 months ago by freya

  • status changed from reopened to closed
  • resolution set to fixed

solved in r1485

Add/Change #222 (upload control problem in IE7)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.