|
Evaluates an expression and displays the results in the brower.
Expressions must be enclosed in double quotes and curly braces, "{ expression }". Spaces between the quote and braces are not allowed. e.g wrong " { expression } " Attributes
ExamplesIn this example <MvEVAL> outputs a variables contents to the browser screen displaying the results. Example:<MvASSIGN NAME="g.name" VALUE="Dana Scully"> <MvEVAL EXPR="{ g.name }"><br> Result: Dana Scully Expression often contain build in Miva Script functions. Example:<MvEVAL EXPR="{ toupper(g.name) }"><br> Result: DANA SCULLY User defined function can be contained within a single compiled Miva Script program and called just like the built in functions. They can also be contained in separate external files. This example calls an external user defined function contained in the file sendemail.mvc. Example:<MvEVAL EXPR="{ [ 'sendemail.mvc' ].SendEmail( to, from, cc, subject, headers, message) }"> Miva Script can also evaluate expressions directly inside HTML tags. The syntax es exactly the same as the EXPR attribute. In this example the form field for shipping is filled in with the value of the global variable g.shipping_fname Example:<MvASSIGN NAME="g.shipping_fname" VALUE="Dana"> Shipping: <input type="text" name = "shipping_fname" value="{ g.shipping_fname }" size="20" /><br /> Result = Shipping: In this way the expression is evaluated exactly like <MvEVAL> |