This topic is locked
[SOLVED]

  After Add - Message Box Print Yes or No

6/10/2011 5:19:49 AM
PHPRunner General questions
P
prattster1874 author

Hi,
Does anyone know how I would, after a record was added, display a message box that gives the user the option(yes or no) to print the record that they had just added?
Thanks in advance for any help!!

Sergey Kornilov admin 6/10/2011

The easiest approach is to use AfterAdd event. Here is the sample code that asks for user conformation and redirects to the View page. You will need to change redirect URL and key column name.

echo "<script>if (confirm('Do you want to print this record?')) location.href='cars_view.php?editid1=".$keys["ID"]."';</script>";


You probably need to pass an additional parameter to the View page to make it print itself automatically once open. This will require a bit of coding.

P
prattster1874 author 6/10/2011



The easiest approach is to use AfterAdd event. Here is the sample code that asks for user conformation and redirects to the View page. You will need to change redirect URL and key column name.

echo "<script>if (confirm('Do you want to print this record?')) location.href='cars_view.php?editid1=".$keys["ID"]."';</script>";


You probably need to pass an additional parameter to the View page to make it print itself automatically once open. This will require a bit of coding.


Superb, thanks!