It’s not marked out with copyright, but it’s not marked out with an open source license, either. You should probably assume it’s covered under the same copyright as the rest of the site, although I’m not a lawyer, and different countries take different views about programming code vs. prose. You can certainly study it, learn how it works, and write your own – that’s the foundation of nine-tenths of the fancy stuff on the Internet.
Technically speaking, it uses jQuery for its basic communication with the page, but that’s not too hard to translate into Prototype if you want to be able to use other effects on the same page without conflict.
It’s still a bit technical for me. If I ‘study’ and ‘write my own’, how do I incorporate this into Freeway? i.e., How do I link the javascript to my html?
Hmmm. Well, you would link the JavaScript file to your page, probably
using the External JavaScript Action for that purpose. Then you would
draw the form elements on your page using Freeway, and you would take
care to name each of these elements according to the rules of your
script. So if you were getting the principal amount, you might name a
field ‘principal’, and in your script, you would access that value
from within your script by the variable document.forms[0].principal.value. Then you would draw another field
on the page to hold the response of your script, call that one output,
and then you would update the value of that field from your script
like this: document.forms[0].output.value = 123.45;
If you haven’t done this sort of thing before, you might want to
subcontract this part of the project out. It’s not quite as simple as
“copy from this other site and paste it here”. It’s actually
programming, even though it runs in the browser and is written in
JavaScript.
If you want to learn how to do this yourself, then a good place to
start is to look on HotScripts.com for some mortgage calculators
written in JavaScript. Anything you find there is going to be written
with the expectation that you are going to paste it into your site, so
there won’t be any license issues (or there will be a fee – and
support to go with it).
Walter
On Jun 30, 2010, at 9:26 AM, Graeme wrote:
Thanks Walter,
It’s still a bit technical for me. If I ‘study’ and ‘write my own’,
how do I incorporate this into Freeway? i.e., How do I link the
javascript to my html?