Hot answers tagged

3

The trouble with your question is that the code resembles more config than coding and there is nothing wrong with it except that it is not DRY between those 2 files. It seems that Ext JS supports require as of version 4, so you simply need to extract the common logic/config into a file that you will require into both places.


2

From looking a little into this You derive mediaContentURL through response.responseXML and title through xml, I would stick in both cases to xml As you guessed, your approach to getting the mediaContentURL is pretty terrible. Use getElementsByTagName and attributes, do not hardcode array indexes Do not use console.log in production code I would use ...


Only top voted, non community-wiki answers of a minimum length are eligible