I am using CGI.
I have a situation where user would like text in red under $ conditions.
I have not written much js other than pilfering.
I would think I need to put the conditional HTML into a variable. But then how do I execute the created variable?
Any ideas would be appreciated.
I have a situation where user would like text in red under $ conditions.
I have not written much js other than pilfering.
I would think I need to put the conditional HTML into a variable. But then how do I execute the created variable?
<script>
var ac = /%availcr%/;
if ac > 0 {
<tr><td><strong>Available Credit:</strong> /%availcr%/ </td></tr>
}
else {
<tr><td><font color="red"><strong>Available Credit:</strong> /%availcr%/ </td></tr>
}
</script>
var ac = /%availcr%/;
if ac > 0 {
<tr><td><strong>Available Credit:</strong> /%availcr%/ </td></tr>
}
else {
<tr><td><font color="red"><strong>Available Credit:</strong> /%availcr%/ </td></tr>
}
</script>
Any ideas would be appreciated.
Comment