Mal's Charge per word form

Hi

I’d like to implement the above Form on a page.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here is a link. The code can also be seen from this page.

http://www.malsforms.com/charge-per-word.html?zoom_highlight=online+advertising#

I searched for Actions, but unable to find any.

All help appreciated.

Paul


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

There are no Actions specifically for this purpose, no. You could add this exact script to your page using the built-in Freeway tools (no Action needed) if you take care to name your fields the same as the example, and copy and paste the relevant script block out of the page source (it’s all done in the last script inside the ). The script is somewhat complicated by the fact that whoever wrote it did so on the back of another script, used for counting the number of words in a comment field or similar (those annoying 5 words left countdown scripts).

This could be written in a much simpler form if you wanted to do so, and if I were doing it, I would use the Prototype.js library and a periodical observer function (checks the form every 1/N seconds) rather than responding to keystrokes. Rewriting it could give you an opportunity to make the parameters more adjustable.

One thing you really do need to consider, though, is that leaving your business logic in the page – in the hands of the user – is inviting someone to alter the code in their browser’s developer tools and submit an ad with most of War and Peace in it for 1¢. It’s not even really hacking if they do that. It’s all well and good to have these sorts of “convenience” tools in the browser, but you need to back them up on the server with the same calculation running in an environment where no fiddling is possible.

Walter

On May 21, 2014, at 3:02 AM, Paul Swan wrote:

Here is a link. The code can also be seen from this page.

http://www.malsforms.com/charge-per-word.html?zoom_highlight=online+advertising#

I searched for Actions, but unable to find any.

All help appreciated.

Paul


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options