Global Header:Code:
- <script type="text/javascript">
- funtion pm(){
- var pmPost;
- if(vf_new_pms == 0)
- {
- pmPost = "<a href="/action/pm"><img src="http://images.virtualforums.co.uk/unread.gif"></a>";
- } else {
- pmPost ="<a href="/action/pm"><img src="http://images.virtualforums.co.uk/read.gif"></a>";
- }
- return pmPost;
- }
- </script>
In table:
This is supposed to determine if there are new PM's or not and show the correct image depending on the result
"<a href="/action/pm"><img src="http://images.virtualforums.co.uk/unread.gif"></a>";
That line is the problem. You need to escape double quotes within the double quotes, or simply use:
pmPost = '<a href="/action/pm"><img src="http://images.virtualforums.co.uk/unread.gif"></a>';
And change the other one!![]()
I can't believe I made that mistake >.<
Edit: I fixed it but it is still not working
Post your changed version, and what the outcome is. You have to show the unread messages image if there's 0 new pms! O.o
Code:
- <script type="text/javascript">
- funtion pm(){
- var pmPost;
- if(vf_new_pms == 0)
- {
- pmPost = '<a href="/action/pm"><img src="http://images.virtualforums.co.uk/unread.gif"></a>';
- } else {
- pmPost = '<a href="/action/pm"><img src="http://images.virtualforums.co.uk/read.gif"></a>';
- }
- return pmPost;
- }
- </script>
There is no outcome
You misspelt the word 'function' you've spelt it funtion.![]()
Oops
Working now?![]()
Yep