This topic is locked
[SOLVED]

 Selected items button doesn't work question on 5.2

2/26/2010 8:16:41 PM
PHPRunner General questions
R
roadyx author

Hi Jane,

On a list page, I migrated an older project to 5.2 build 4905. It used to work.
On HTML mode I added:

<SPAN class=buttonborder><INPUT class=button onclick="frmAdmin.a.value='addtocart'; frmAdmin.submit(); return false;" value="Select Check Box To Add To Cart" type=button>

</SPAN>

just before:

{BEGIN deleteselected_link}....


On the Events List Page - Before Record Deleted, I have the following stub:



global $conn;
if(@$_POST["a"]=="delete")

{

return true;

}
if(@$_POST["a"]=="addtocart")

{

echo "<script>alert('called add to cart')</script>";

$strSQLInsert = "insert into shopping_cart prod_id values '".$deleted_values["prod_id"]."')";

db_exec($strSQLInsert,$conn);

return false;

}


The "add to cart" button doesn't work. However the "deleted selected button" works fine.
Please advice.
Thanks! Roadyx

Sergey Kornilov admin 2/27/2010

Form name changed from frmAdmin to frmAdmin1.



<SPAN class=buttonborder><INPUT class=button onclick="frmAdmin1.a.value='addtocart'; frmAdmin1.submit(); return false;" value="Select Check Box To Add To Cart" type=button>

</SPAN>


You can also try new 'Insert button' feature which makes things smoother.