This topic is locked

Messagebox

8/11/2008 12:01:03 PM
PHPRunner General questions
G
gbhmayer1 author

How to add a messagebox (in the Add page /Before record add event) with the options Ok / Cancel ?

J
Jane 8/12/2008

Events are executed on the server side (PHP code) while message boxes are displayed on the client side (Javascript).
You need to explain what exactly you trying to achieve using message box.

G
gbhmayer1 author 8/12/2008

I have two fields in add form: Final_date and inicial_date (it´s a recurrent events application) where final_date > inicial_date. I would like to show a alert message when the user entry final_date < inicial_date. ( my english is poor).

J
Jane 8/12/2008

Hi,
use Before record added event on the Events tab for this purpose.

Here is a sample:

if (strtotime($values["final_date"])-strtotime($values["inicial_date"])<0)

{

?><script>

alert("error");

</script><?php

return false;

}

return true;