Miva Merchant Modules and Development
Want to start an online store? We work with you from start to finish, from commerce platform to design to SEO.
Experience counts, and we have a lot.

JS: Pass Input Values to JS Functions

Scot Ranney • December 18, 2023


pass l.var1 and l.var2 to js function

<input type="text" name="{ MYINPUT[l.idx] }" value="{ l.var2 }" size="40" onchange="RunMyJSFunction( l.var1, l.var2 );">
<input type="text" name="{ MYINPUT[l.idx] }" value="{ l.var2 }" size="40" onchange="{ 'RunMyJSFunction( \'' $ encodejavascriptstring( l.var1 ) $ '\', \'' $ encodejavascriptstring( l.var2 ) $ \'' );' }">

https://www.scotsscripts.com/mvblog/pass-input-values-to-js-functions.html

mvkb_js