Archive

Anyone here proficient in Javascript?

  • O-Trap
    I've got a question regarding adding up a variable from several .js pages. These are subscribers, so the number changes.

    I wanted to know if it was possible to add all these numbers up using only the .js URL that produces them.

    Ex:

    http://somewebsite.com/subscriber_number.js?campaign_name=campaign1&var=0
    http://somewebsite.com/subscriber_number.js?campaign_name=campaign2&var=0

    If you put one in the address bar, it shows the number 153. If you put the other in the address bar, it shows the number 156. As I said, though, these numbers will grow as new people sign up.

    Is there a script that will add these together using just the above URLs?


    Where's the script wizard, Ender Wiggin, when you need him?
  • dlazz
    I'm not an expert, but a php script would probably be easier.

    No, I can't help you... But I'm pretty sure it's way more flexible in that regard.
  • O-Trap
    Ah, I thought that PHP wouldn't work because it's on the server side, and these links have to "fire" before they populate the number.

    I'll see if I can piece it together.

    Thanks.
  • justincredible
    What do you want to do with the new number once you get it?
  • O-Trap
    Just display it in a field on the page.

    I got impatient last night and paid someone to write something for me, but it populates the number in a lightbox popup. I'd rather just have it on the damn page (which I told him, but he's now not responding).
  • justincredible
    How much did you pay him? Post the code and I might be able to help you get it out of the lightbox and on to the page.