All users were logged out of Bugzilla on October 13th, 2018

how can i check whether browser supports javascript "FormData()" or not?

RESOLVED INVALID

Status

()

--
enhancement
RESOLVED INVALID
8 years ago
8 years ago

People

(Reporter: glxguru, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13

I cant check for browser supports "FormData()" by if-else .. or is there any another method to check it 

I tried like this
 if(FormData())
{
//do Something good ever 
}
else 
{
//do something  by old way
}



Reproducible: Always

Steps to Reproduce:
1.write html code to drag & drop
2.use fd = new FormData()
3.check for support of fd;
Actual Results:  
Error produced like FormData is not defined in Older browser

Expected Results:  
if(FormData())
{
//do Something good ever 
}
else 
{
//do something  by old way
}



or provide an element for its value can be assigned by single or multiple objects at a time which should be POST'ed by form or without submitting form like by 
var xhr = XmlHttpRequest();
//assgn objects here
eg. <tag name="obj"></tag> for obj.setattribute('value','multipleObjectsCollection');
 //finally
xhr.send(obj);
//withot submitting form
(Reporter)

Comment 1

8 years ago
How can i get solution over this. how much time required?
OS: Linux → All
This is not a security bug.  Bugzilla is also not a support forum; please don't abuse it as such.

I strongly suggest getting a decent JS book, so you understand the difference between |if (FormData)| and |if (FormData())|.
Group: core-security
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.