Show a message with condition: how to?

GreyHead 15 Sep, 2011
Hi monak83,

You could add a div to your form with a id='message' and change the script here
if (sup_not_round<3500)
{ alert ("IMPORTANTE: Le dimensioni devono essere superiori a 50x70 cm.\nPer stampare etichette con dimensioni inferiori vai alle Etichette ALTA QUALITA'")}
to something like
if (sup_not_round<3500) { 
  $('message').setHTML("IMPORTANTE: Le dimensioni devono essere superiori a 50x70 cm.\nPer stampare etichette con dimensioni inferiori vai alle Etichette ALTA QUALITA'");
} else {
  $('message').setHTML("");
}

Bob
mousesport 23 May, 2012
how to display the value of the variable "sup_not_round" in the message?
if (sup_not_round <3500) {
    $ ("Message") setHTML ("Importante. sup_not_round").
{} Other
    $ ("Message") setHTML ("").
}

after the addition of a variable in a message, it appears as text, a need to make it output a value "sup_not_round"
GreyHead 23 May, 2012
Hi mousesport ,

The code you posted looks broken? It's not the same as the example earlier.

What exactly do you need to do?

Bob
This topic is locked and no more replies can be posted.