vForums Support > Programming & Coding :: Code Requests & Support :: > [Anyone] Popup For Birthday List

[Anyone] Popup For Birthday List - Posted By dog199200 (dog199200) on 31st Oct 08 at 10:19am
Ok I have been trying and I can not get this to work for the life of me. What I am trying to do is use a js popup to display the list of birthday people's and I can't get it to work, all because the { } that are needed in the calling of the data ends up breaking the js.

Code:
 
  1. <script>
  2. function bdPopup(){ prompt("{birthdays}"); }
  3. </script>
  4. <a href="javascript: bdPopup();">{birthday_total}</a>
 


and I have even tried to use the number code for the { } and that doesn't work either:

Code:
 
  1. <script>
  2. function bdPopup(){ prompt("(birthdays)"); }
  3. </script>
  4. <a href="javascript: bdPopup();">&*#40;birthday_total&*#41;</a>
 


Edit: Remove the * from the number code and it will work, had to add it in or the code would convert

Can someone please help me get something that will work, and as soon as possible.

Re: [Anyone] Popup For Birthday List - Posted By GlitchesSocom (ravenelle) on 10th Nov 08 at 3:30am
well I am pretty new to coding but my guess is that {birthdays} is not a global var and only work in templates but I am not sure.

Re: [Anyone] Popup For Birthday List - Posted By dog199200 (dog199200) on 10th Nov 08 at 9:26pm
...thats where it is going to be used.... in the template, but hmm maybe i get talkt o ross and get the code he used for it and then recode it for a setup for global header or something