Community Forums 

Main Content

Help with running total

    Oct 24 2013 03:18:24

    #1

    Evolving Door

    Join date : 2011-01-29      Posts : 21

    I have a report order page that has been working for years. It includes a running total accumulated at the bottom of the page for all items that the user checks off, generated by a JavaScript function (UpdateCost). I recently added some new items (Combo Package near the top) and it was working fine.

    But then I added the Art Charts near the bottom of the page and suddenly it won't tally the running total. It passes the selected items to the cart, but the running total on the order page remains $0.00.

    I have weeded out quite a few errors, but I've run out of ideas. I can't for the life of me figure out what the problem is. I'm hoping someone here can help me troubleshoot it. I am not "fluent" in JavaScript, but I can usually follow what it's doing enough to figure out how to fix a problem.

    The test page that has the updates is here:
    http://www.evolvingdoor.ca/marketplace/astrology_reports_order_page-temp2013.htm

    The live page (so you can see how it's supposed to work) is here:
    http://www.evolvingdoor.ca/marketplace/astrology_reports_order_page.htm

    Many thanks for any help that anyone can give! If it would help for me to post code, let me know what you need and I'll do my best to provide it. Thanks!



    Oct 24 2013 04:05:06

    #2

    Debbie Q

    Join date : 2008-09-18      Posts : 5005

    I don't know if this is the problem but there is a break in the code on the art chart after onclick="

    Debbie Q

    Mal's Support: www.mals-e.com/support.php
    GT's Forms and examples: www.malsforms.com
    Helpful java scripts: www.gemasana.com/mals
    Shipping help documents: www.stoner.org.uk/mals

    My Create-A-Book Publishing - mycreateabook.com
    Personalized Books, Music CDs and Gifts for all ages and occasions.

    Please help me out and share my site on your networks.




    Oct 24 2013 15:38:29

    #3

    Evolving Door

    Join date : 2011-01-29      Posts : 21

    Debbie Q said I don't know if this is the problem but there is a break in the code on the art chart after onclick="

    Hi Debbie, Thanks very much for your reply. I found a couple of lines like that and fixed them, but the problem still remains. I doubt they would have been a problem anyway, since one of them was in the live page that's working fine.

    Back to the drawing board. Still hoping for help with this. Thanks in advance! :-)



    Oct 24 2013 16:03:03

    #4

    GT

    Join date : 2008-09-18      Posts : 3256

    Who's script are you using?

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.




    Oct 25 2013 00:27:28

    #5

    Evolving Door

    Join date : 2011-01-29      Posts : 21

    GT said Who's script are you using?

    Hmm... That's a good question. I started with someone's script from a page for users of Mal's, but it's changed quite a bit since then, adding my own stuff. It's a Javascript problem, I'm pretty sure, but maybe I've got a typo or problem with Mal's code too. I put this together at least 2 years ago and I'm not sure I could find where I first got the running total code from initially.



    Oct 25 2013 00:53:42

    #6

    Evolving Door

    Join date : 2011-01-29      Posts : 21

    FOUND IT! It was a simple typo in a DIV ID. I hadn't capitalized the ID name. I thought I'd caught them all but there was one left. After I fixed that, it all works perfectly. I found it by taking out all the Art Pages at the bottom and adding them back one by one and testing the page until it didn't work anymore. Doh! Red-faced but happy now. :-)

    Thanks very much for your help, Debbie Q and GT. Much appreciated!