rule of thumb, if it's one time use, then do it on the page in question. more than one, in application.dryml
On Apr 21, 11:00 am, Jeremy Savoy <[email protected]> wrote: > So if I wanted to do this with client side javascript, I would add my > javascript functions to application.js but then how and where do I > apply these javascript functions to the <input> fields for onclick or > onkeypress in hobo - application.dryml or elsewhere? > > On Apr 20, 5:44 pm, Owen Dall <[email protected]> wrote: > > > > > I think this is a common enough pattern to be "hobo-fied". I know Jeff > > Lapides has been bugging me about a simple way to do this for two years :-) > > > What do others think? > > > On Tue, Apr 20, 2010 at 4:19 PM, Bryan Larsen <[email protected]>wrote: > > > > Jeremy Savoy wrote: > > > >> I have a model for budget item entries. Each entry contains the total > > >> cost, the amount paid, and the amount due on the item - all are typed > > >> float > > > >> I would like for the amount_due to be calculated for the user whenever > > >> there is a change in total cost or amount paid. This change could be > > >> when the item is initially being created or edited at some future > > >> point. > > > >> Is this something that I'll just have to implement in javascript/ajax, > > >> or is there already functionality like this built into rapid? > > > > It's certainly easy enough to do server side: You can add a method called > > > "total" to the container model and then add it to the list of columns in > > > the > > > view. And then you could use Hobo's Ajax mechanism to update that view > > > whenever something changes. If you want to try this, I can give more > > > details > > > > But that seems excessive -- it seems to me that this would best be done in > > > pure client-side Javascript. It's probably easier and definitely a lot > > > faster. This only works if the entire budget fits on a single web page. > > > (You can hide sections of the page if it's too big visually, but still > > > small enough that it doesn't kill the browser). > > > > Bryan > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Hobo Users" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<hobousers%2bunsubscr...@googlegroups > > > .com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/hobousers?hl=en. > > > -- > > Thanks, > > - Owen > > > Owen Dall, Chief Systems Architect > > Barquin International > > Cell: 410-991-0811 > > > -- > > You received this message because you are subscribed to the Google Groups > > "Hobo Users" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/hobousers?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Hobo Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/hobousers?hl=en. -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
