Results 1 to 4 of 4

Thread: [RESOLVED] backbone.js noob question

  1. #1

    Thread Starter
    Frenzied Member dolot's Avatar
    Join Date
    Nov 2007
    Location
    Music city, U.S.A.
    Posts
    1,253

    Resolved [RESOLVED] backbone.js noob question


    So I've found myself stuck with make mods to a front-end application with backbone.js. There seems to be these inline data bound elements like this:

    Code:
    <div class="alert alert-danger">
                    The total amount to be charged to your credit card will be the policy payment amount plus a ${{convenienceFee}} convenience fee. 
                </div>
    How do I access that {{convenienceFee}} in javascript?
    I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
    My war with a browser-redirect trojan

  2. #2
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,537

    Re: backbone.js noob question

    You don't... well, not exactly. Not familiar with backbone, but it sounds like it's similar to node.js or angular, which means that it's MVC based... so your convenienceFee is in the model, and that's where you have direct access to it... The snip you posted is the view, which means it's (if you're following MVC) just the display and isn't to be manipulated here... it should already be done by the model.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Frenzied Member dolot's Avatar
    Join Date
    Nov 2007
    Location
    Music city, U.S.A.
    Posts
    1,253

    Re: backbone.js noob question

    Thanks TG - I'll take a look a the model (well, see if I can figure out which one it is) and let you know how that goes.
    I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
    My war with a browser-redirect trojan

  4. #4

    Thread Starter
    Frenzied Member dolot's Avatar
    Join Date
    Nov 2007
    Location
    Music city, U.S.A.
    Posts
    1,253

    Re: backbone.js noob question

    Yep, sure enough - found the property on one of the models. Thanks for pointing me in the right direction TG.
    I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
    My war with a browser-redirect trojan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width