Some thoughts about Ajax
iframe and httpxml
I use to use successfully Ajax iframe based calls, which are quite browser independent and robust. However I met very interesting problem. In most cases my calls returned some HTML content. Sometimes the content was JSON and worked fine as well. Doing some other research I met a problem. JSON returned calls stopped working. JSON structures were messed up and can’t be parsed back. The problem appeared that iframe returned content is retrieving using body.innerHTML, which doesn’t content originally returned data, it got some HTML parsing and normalization touch. I tried to manipulate with content type of response, however it didn’t make things better. So I was trapped and have to switch to use httpxml component based calls. Here I met another problem, if I need to submit form data, I have to do the work exact as browser does for accurate collecting data from all form fields. I was excited to find a ready for use solution. Alas, some crappy code only. So I spend an hour for writing my own implementation which I gladly post here for free. I hate see tons of javascript low quality code posters asking for donation. People, learn to write quality code and you won’t be needed to ask for donation since you can get a decent well paid job after.
function toPostStr(form) {
var res = "";
for ( var i=0; iZune HD
Microsoft read the blog by one eye
Zune HD is out, but will it get a popularity? No doubts, an answer is no. Just following someone’s business model without understanding why it works it a bad practice. iTunes store works, but Zune store won’t Certain Microsoft has a chance to make some money but will they cover all expenses? I am certain that not. All player in PDA/DAP should understand that effective way of fighting against Apple is providing a standard. Giving something proprietary again hoping that accessories maker will spend money on adopting it is a crazy idea. No USB interface for Zune HD means - no Zune HD for consumer.