Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F884777
iframeUploadTest.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
iframeUploadTest.html
View Options
<
html
>
<
head
>
<
style
type
=
"text/css"
>
@
import
"../../resources/dojo.css"
;
</
style
>
<
script
type
=
"text/javascript"
djConfig
=
"isDebug: true, dojoIframeHistoryUrl: '../../resource/blank.html'"
src
=
"../../dojo.js"
></
script
>
<
script
type
=
"text/javascript"
>
dojo
.
require
(
"dojo.io.iframe"
);
var
callCount
=
0
;
var
ioResponse
;
function
sendIt
(){
dojo
.
io
.
iframe
.
send
({
form
:
dojo
.
byId
(
"uploadForm"
),
handleAs
:
"application/json"
,
content
:
{
increment
:
callCount
++
,
fileFields
:
"ul1"
},
handle
:
function
(
response
,
ioArgs
){
if
(
response
instanceof
Error
){
console
.
debug
(
"Request FAILED: "
,
response
);
}
else
{
console
.
debug
(
"Request complete: "
,
response
);
}
ioResponse
=
response
;
// to get at afterwards in debugger.
}
});
}
</
script
>
</
head
>
<
body
>
<
p
>
This file tests dojo.io.iframe upload using a form POST with a file upload button.
</
p
>
<
p
>
<
b
>
Note:
</
b
>
This test makes a form POST to upload.cgi. This cgi needs to be made executable for this test to work, and it won't work from local disk.
</
p
>
<
form
action
=
"upload.cgi"
id
=
"uploadForm"
method
=
"POST"
enctype
=
"multipart/form-data"
>
<
input
type
=
"text"
name
=
"foo"
value
=
"bar"
>
<
input
type
=
"file"
name
=
"ul1"
>
<
input
type
=
"button"
onclick
=
"sendIt(); return false;"
value
=
"send it!"
>
</
form
>
</
body
>
</
html
>
File Metadata
Details
Attached
Mime Type
text/html
Expires
Sun, Apr 6, 10:54 (2 w, 19 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27132
Default Alt Text
iframeUploadTest.html (1 KB)
Attached To
rZED Zed
Event Timeline
Log In to Comment