Here's the code I have:
It outputs this line (for ELSE): <a href="javascript:void(null)" onClick="return log_out()">logout</a>
This came out exactly the way I want it to be, but the problem is, I don't want it to be displayed as plain text - I want the browser to interpret this line as HTML code.
How do I do that?
Thanks.
<script language=Javascript type="text/javascript">
<!--
var logout = "<a href="javascript:void(null)" onClick="return log_out()">logout<\/a>"; <-- bah.. it doesn't look like this..fusetalk parsed it for me.
if (!getCookie("currentUser")) { //not logged in
document.writeln("Not Logged In");
}
else {//logged in
document.write(logout);
}
//-->
</script>
It outputs this line (for ELSE): <a href="javascript:void(null)" onClick="return log_out()">logout</a>
This came out exactly the way I want it to be, but the problem is, I don't want it to be displayed as plain text - I want the browser to interpret this line as HTML code.
How do I do that?
Thanks.