I'm trying to use an already set php vairable in javascript in an if statment. Here is the code.
if (top.window.document.title !={SITENAME} :: {PAGE_TITLE})
{
top.window.document.title={SITENAME} :: {PAGE_TITLE}
}
</script>
But as you can see it wont' work because the if statment thinks that the } in {SITENAME} :: {PAGE_TITLE} is suopposed to end the if statment. Anyone can help?
if (top.window.document.title !={SITENAME} :: {PAGE_TITLE})
{
top.window.document.title={SITENAME} :: {PAGE_TITLE}
}
</script>
But as you can see it wont' work because the if statment thinks that the } in {SITENAME} :: {PAGE_TITLE} is suopposed to end the if statment. Anyone can help?
Comment