398
seCure develoPment For mobIle APPs
First a click event is added to the CSS class of buttons, addItem. is allows a click
event handler to be added to each catalog item. e item to add to the cart is contained
in the value attribute of the button. is is the product code ID inserted into each
buttons value attribute during page creation with inline PHP on line number 46 in
ajaxStore.php.
<button class="addItem" value="<?php _H($row['product_code']);?>">
Notice the class addItem given to each button, which allows us to control them as
a group. In this case, it means connecting the same event handler to all the Add
buttons even though each button has a different code for adding the product it is
associatedwith.
e formNonce loaded into the pag ...