Quote:
Originally Posted by Boofo
Try adding the javascript to the headinclude or header template.
|
Tried both, no change.
Quote:
Originally Posted by Danny.VBT
The problem is you wrapped the javascript around <vb: literal> tags, which you should do, but that means none of the {vb: raw } tags are being parsed in the script.
Maybe try passing this data through the function?
Code:
<a href="javascript:markAsRead({vb:raw session.sessionurl},{vb:raw bbuserinfo.securitytoken});">{vb:rawphrase mark_forums_read}</a>
Code:
<vb:literal>
<script>
<!--
function markAsRead(session, markreadhash)
{
var markRead= confirm("Do you really want to mark all forums as read?");
if (markRead== true)
{ window.location="forumdisplay.php?" + session + "do=markread&markreadhash=" + markreadhash;
}
else
{
}
}
//-->
</script>
</vb:literal>
|
I tried the above but get a "Syntax Error".
I think we are getting closer as it makes sense that the vb:literal tags are causing the noparse.