Suppose I have a javascript variable "is_valid"
If the variable is 1, I'd like to display:
<div>It's valid!</div> ...and a big chunk of other code
Otherwise...
<div>NOT valid</div>...and a big chunk of other code
I do NOT want to use INNERHTML. I want to do it like this:
<script type="text/javascript">
if(is_valid == 1){
</script>
It's valid!
<script type="text/javascript">
}else{
</script>
It's not valid
<script type="text/javascript">
}
</script>