Apparently, I had to do above (copy/paste) task couple of times this evening.. And, finally, I see where it went wrong....
It is "Beautify" option that wasted hours of my time as per my observation (not sure if is too smart and doing something else). Check attached, one is original code and second file (beautify) is the code that got adjusted with Beautify option of Web IDE. My application (master list click option) is not working with this Beautified code.
Regards,
Naveen