Calc Builder Support

Calc Builder support
No se permite escribir sin estar logado. Por favor, login

if else fuction 05.02.2015 10:00

Dear all, I have the fuction. If epan>2 then I want to see the results in the result layout else I want to have an error message asking user to insert new values. Unfortunately I don't know what to put after "else"

This is the half of the code:

if ($epal > "2") {
else {
I want to see a message error or a pop up error!!!??

Re: if else fuction 05.02.2015 11:18

if you were printing a single result, like $result, you could use that approach to set $result with the if/else structure:




but looking at your code, seems you are calculating several results, so we'd use this solution instead:

At your exit layout, create the two sections (real results, and error message). Enclose each one inside a div and set a different style for each one:

//real results

...div style="display:##displayreal##"

//here your result section..close div

//error section

..div style="display:##displayerror##"

//here your error section...close div

and now you can set at the code the display of each section according to your condition:






Please let us know if you need further help with this.

Thanks, regards
Moonsoft Team
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect
FaLang translation system by Faboba

Lo que nuestros clientes opinan de nosotros