Then with the help of my colleague I was successful.The change I made is :
But I don't understand why it worked on this way.My colleagues explanation was it was trying to access the variables as html. But I didn't understand it.
Can anybody help me to clarify this ? Please don't hesitate to ask if you don't understand my explanation.