Arry
I'm not a bad person, I'm just a bad liar!
Posts: 5
|
Post by Arry on Jan 31, 2008 18:17:01 GMT -5
Can someone give me any clue of how to display the number of new PMs?
All I know so far, is that I need a variable, but I'm not sure what comes next...
Like this:
var +newPM+
And then to use in a: document.write("+newPM+ PM is / PMs are unread...");
So... does anyone knows?
|
|
Samuel
Former Coding Moderator
:D
Posts: 154
|
Post by Samuel on Feb 1, 2008 14:38:30 GMT -5
In short, you need to use RegExp.
looks something like:
var newpms = (TD[2].innerHTML.match(/, (\d+)\ (is|are) new./i)) ? RegExp.$1 : 0;
where TD is your td variable.
|
|
Arry
I'm not a bad person, I'm just a bad liar!
Posts: 5
|
Post by Arry on Feb 2, 2008 12:57:06 GMT -5
Okay... thx a lot.
edit: I guess on document.write I have to put something like ("text" + newpms + "another text");
Right? ;D
|
|
Samuel
Former Coding Moderator
:D
Posts: 154
|
Post by Samuel on Feb 3, 2008 13:18:29 GMT -5
That is correct =]
|
|