in file.php, there’s some code like this:
[code=php]$save_button1 = “<input type=”submit” name=”knop” value=”save” onClick=”setValues( ‘1’ );” class=”formbutton”>”;
$save_button2 = “<input type=”button” name=”knop” value=”save” onClick=”setValues( ‘1’ );document.location.href=’cmc.php?id=$relation_id&refreshTopMenu=true&type=sales&search='” class=”formbutton”>”;
$template->process( BUDGET_TOP, array(
lock_button => $lock_button,
save_button => $save_button,
hidden_values_money => $hidden_values_money,
.
.
.
it will go to the file.tpl
the save_button will go to :
[code=php]
<form method=”post” action=”edit_budget.php” name=”budget_sales” onkeypress=”checkEnter(events)”>
<td class=”grey” align=”left”>
<input type=”hidden” name=”relation_id” value=”{relation_id}”>
{save_button}
.
.
.
<input type=”button” name=”cancel_button” onClick=”document.location=’edit_relation.php?action=view&type={type}'” class=”formbutton” value=[CANCEL]>
{lock_button}
</td>
if i use save_button1, it’ll go to action=”edit_budget.php” & it’ll save some value, but if i use save_button2, it’ll go to the other page but it didn’t save any value..
how to make a button that can save some value & go to other page?
i’m confuse on how to make the button works..