on-rev example: dynamic table (was: 'globals.cgi' conversion)

Mark Smith lists at futilism.com
Sun Apr 19 18:55:52 EDT 2009

I've finally taken the plunge and worked up a little css and  
javascript to do a bit of ajax stuff. It's fairly poor, but it's here:


css is great! javascript so far is ok but a bit hard to love - maybe  
I'll warm to it as I progress...



On 19 Apr 2009, at 23:03, Ian Wood wrote:

> On 18 Apr 2009, at 09:33, Andre.Bisseret wrote:
>> I was expecting something like a beautiful web page ;--))
> This isn't much more beautiful, but it's less like a system  
> readout. ;-)
> http://ijw.on-rev.com/form1.irev
> Put in two numbers and hit 'Submit' to see a 'times table'-like  
> table appear. Nothing all that special and I'm sure it could also  
> be done in PHP, but it would have taken me longer to remember how  
> to do a repeat in PHP than the whole thing did via rev/transcript.
> The Rev code looks like this:
> <?rev
> put "<table cellpadding='2'>"
> repeat with x = 1 to $_POST["x"]
> put "<tr>"
> repeat with y= 1 to $_POST["y"]
> put "<td>" & (x * y) & "</td>"
> end repeat
> put "</tr>"
> end repeat
> put "</table>"
> ?>
> Which is nice and familiar.  Given the power of Transcript/Rev, it  
> would be easy to add in some sophisticated error-checking code for  
> letters instead of numbers, and instead put a sensible error  
> message if someone puts in garbage.
> Ian
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

More information about the use-livecode mailing list