Update hidden input value with onclick event from ajax drop down menu

十年热恋 提交于 2019-12-02 04:12:47

Try to put in your php file:

'onlick' => '$("element_'.$yourelementid.'_price").val("'.$data['price'].'");'

Then you'll have in your javascript to get the value from this hidden input instead of the data-pricedef attribute of your "Quantity" input.

Correct me if I do not understand your problem. I tried to reply from the code you showed in your video.

If you change the input to

<input type="hidden" id="element_273_price" value="">

You should be able to do

$("#element_273_price").val(price_value);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!