Jack of Bladez
Full Member
Fear Jack of Bladez and his fake moustache!
Posts: 625
inherit
31713
0
Sept 13, 2005 2:38:26 GMT -8
Jack of Bladez
Fear Jack of Bladez and his fake moustache!
625
October 2004
autry
|
Post by Jack of Bladez on Jun 19, 2005 15:41:35 GMT -8
1.I want to add an Icon to the Menubar for PMS, is there anyway that I can have it change to show new/old pms?
2.If so how Can I make it change in order to show new/old pms?
|
|
inherit
42438
0
Mar 16, 2006 20:56:27 GMT -8
Tammy™
1,961
May 2005
sexytammy
|
Post by Tammy™ on Jun 19, 2005 18:16:08 GMT -8
you can add a button in your menu bar...and extra one if thats what your askin
|
|
inherit
31940
0
Jul 27, 2011 13:50:35 GMT -8
¿J-pop?
2,286
October 2004
darkryu2
|
Post by ¿J-pop? on Jun 19, 2005 18:19:16 GMT -8
If you want to do both, it will require a code, try looking at: G101
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jun 20, 2005 12:32:02 GMT -8
If you want to do both, it will require a code, try looking at: G101Not to be rude or anything, but we have a request board here, no need to send people somewhere else
|
|
inherit
38464
0
Jun 8, 2007 12:03:04 GMT -8
[HkK Rly]
1,742
March 2005
maddenking2
|
Post by [HkK Rly] on Jun 20, 2005 14:07:44 GMT -8
You can try doing this:
<script language="JavaScript" type="text/JavaScript"> var ttd=document.getElementsByTagName('td'); if(ttd[2].innerHTML.match(/0 are new/i)){ EXTRA BUTTON CODE WITH NO PM BUTTON HERE } else { if(ttd[2].innerHTML.match(/1 is new/)){ EXTRA BUTTON CODE WITH NEW PM HERE } else { EXTRA BUTTON CODE WITH NEW PM HERE } } </script>
EDIT: if the code is in HTML then do this
<script language="JavaScript" type="text/JavaScript"> var ttd=document.getElementsByTagName('td'); if(ttd[2].innerHTML.match(/0 are new/i)){ document.write('EXTRA BUTTON CODE WITH NO PM'); } else { if(ttd[2].innerHTML.match(/1 is new/)){ document.write('EXTRA BUTTON CODE WITH NEW PM HERE'); } else { document.write('EXTRA BUTTON CODE WITH NEW PM HERE'); } } </script>
but in the document.write(' ') you can't have line breaks.
^^ not sure if that'll work
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jun 20, 2005 14:15:18 GMT -8
{~mâddeňKIÑĜ~}, Your code will error, you haven't defined "TD"
|
|
inherit
38464
0
Jun 8, 2007 12:03:04 GMT -8
[HkK Rly]
1,742
March 2005
maddenking2
|
Post by [HkK Rly] on Jun 20, 2005 14:16:45 GMT -8
{~mâddeňKIÑĜ~}, Your code will error, you haven't defined "TD" oh yeah...
|
|
inherit
Proboards Legend
212
0
May 11, 2006 12:32:55 GMT -8
california
21,035
December 1999
california
|
Post by california on Jun 23, 2005 0:37:15 GMT -8
Well I think Jack's trying to write his own code, so he's probably just looking for an OS snipet that grabs the number of PMs, right? This will do it:
var td=document.getElementsByTagName("td"); var numPMs = (td[2].innerHTML.match(/, (\d+) \w{2,3} new/)) ? RegExp.$1 : 0;
From there it's just an if else statement to assign another variable to the right image URL.
|
|