The complications:
- backend needs to be agnostic towards how many uploads are being sent, preferably no iteration over numbered input name attributes
- frontend is proper XHTML, therefore adding new input elements can't use document.write JavaScript methods
Let's deal with the frontend first. XHTML deprecates document.write because it breaks the idea of XHTML as a properly formed XML document: anything could be inserted into your webpage no matter how well or poorly formed it is. If I'm not mistaken XHTML served as its correct MIMEtype results in browsers throwing errors when they encounter document.write.
Fortunately, XHTML nominally being XML, it supports XML's methods for inserting, removing and changing internal content. Let's take a look at some sample JavaScript:
No comments:
Post a Comment