Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML5 & File Uploads

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I was hoping to use HTML5's better support for file uploads, but seem to be stuck.

I was following this blog :
But it appears to be a total waste of time, because the article said IE9 Beta didn't support the HTML5 File API, but I am using IE11 and still it won't work as I cannot access
Code:
$('#myFileInputID').files[0]

Does this mean HTML5 and file uploads is a waste of time, as IE is the most used browser and I'm not interested in any solution that doesn't include IE support.

I'm hoping I've just been looking in the wrong place and you guys can point me to a blog / tutorial / guide that will help me build better file upload UI/UX with HTML5.

Of course if IE9 RTM doesn't support any of this, then it's a no-go anyway as IE9/Vista is the HTML5 modern web watershed!

Thanks,
1DMF

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
 
I've given up with HTML5 , until Vista is dead, it's pointless, because M$ aren't going to release IE10+ for Vista, making HTML5 unusable!

I've yet to see the point in using modernizer and plethora of JQuery plugins, that require a tonne of fallback code for browsers that don't support it not to mention additional hidden fields for error messages etc. etc. , it's exactly how I did it before HTML5, so why code the same thing twice?






"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
 
The choice of technology depends on your audience. Check your site reports to see the percentage of users that would be affected by your choices.
 
I already know I have a lot of users on IE9, so it has to be a solution that works with poor HTML5 support. I'm prepared to ditch <IE9 as people need to replace XP A.S.A.P. and anyone using any other browser simply needs to update it and they have HTML5 support, it's M$ screwing everything up like usual!

The frustrating thing is the available so called 'HTML5 Validation' JQuery plugins, simply don't work or offer a very poor attempt at HTML5 Form Validation.

I've spent the entire day faffing around with them to find I have no choice but to go back to HTML4 and the standard JQuery validation plugin.

h5validate = placeholders aren't working in IE9
html5Form = only works with inputs, not checkbox, select list etc.

As this blog states :
What the world really needs is a jQuery plugin which provides backwards compatibility for the HTML5 validation attributes. If a browser supports the HTML5 validation attributes then the plugin would do nothing. Otherwise, the plugin would add support for the attributes.

Unfortunately, as far as I know, this plugin does not exist. I have not been able to find any plugin which supports both the required and pattern attributes for older browsers, but does not get in the way of these attributes in the case of newer browsers.

Having spent the day hunting and trying what I could find, I totally agree, the current HTML5 plugins are a waste of time, don't work and don't provide what we want -> HTML5 Form Validation!

Unless someone knows of a plugin that actually does work?






"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
 
Good new boppers... I found a working HTML5 forms validation polyfill that works including placeholder text and a popup error message just like HTML5 :)


I found the following site is a good resource for checking browser compatibility and getting polyfills to bridge the gap.


As I suspected, I had simply been looking in the wrong place previously - so hope it helps others [thumbsup]

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top