RSS -TypeError in IE

30 Mar

I tried to use dojo iframe submission for uploading a file.This is what I did.
I have a html form named elementForm enctype set to multipart/form-data

In my js I tried to submit this form

function uploadPic(){{
method: "post",
form: "elementForm",
preventCache: true,
handleAs: 'json',
load: successElementUpload,
sync: true,
timeout: 10000
function successElementUpload(response,ioArgs){
function errorElementUpload(Error){

In FF this works .But in IE (7&8) I got this error
TypeError:getElementsByTagName(…).0.value is null or not an object
and IE generated a Http GET request instead of Http POST request.
I found same question being asked in dojo mailing list

It seems that the problem is with form action.In html form I haven’t specified the form action but in js I have specified that (method: “post”).
But in IE form action is not set to POST.Since it generates a default GET request.
So I tried setting form action in HTML form itself.Inside form tag set (method=”post”).Then it worked in IE also 🙂

Leave a comment

Posted by on March 30, 2010 in dojo


Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: