Solved: Getting value from the textbox

replace ".attr('value')" with  '.val()' function