Update input textbox attribute

Hi, I have a input textbox widget that i would like to update with a jquery value when I press Save on a datagrid. I have a Javascript Snippet, https://appstore.home.mendix.com/link/app/43096/Incentro-Business-Acceleration/JavaScript-Snippet , where I have followimg code; this._contextObj.set('mytextbox', JqueryVal); However my input textbox, mytextbox, will not be updated and Saved with my jqeury value, JqueryVal.  Does anyone know why this doesn't work?
1 answers

Try to use HTML Snippet instead of Javascript Snippet and choose the JS option Use same code 

this._contextObj.set('mytextbox', JqueryVal);