Aha, I got it. It worked. Cheers, linly
On 2月13日, 下午10時08分, The Editor <[email protected]> wrote: > On Fri, Feb 13, 2009 at 4:39 AM, Linly <[email protected]> wrote: > > > Hi Dan, > > > Sorry to ask this. I have a form like this: > > > [form] > > [submit delete] > > [session stamp {p}] > > [session delete {p}] > > [form] > > > (Actually it's part of the "action.delete"'s code.) > > > How can I transform it to a command so I can call it from other page > > and execute it directly without going to the "action=delete" page? > > Well first, in BoltWire, the word "command" refers to form fields that > do certain things, like stamp and delete above. So this is already a > form with commands in it. > > If you want to make a function that does the same thing > [(stampdelete)] for example, you would have to create some custom php > code. > > Or, you can use BoltWire's internal scripting action. Create a page > called site.script.stampdelete and convert your form to the macro > format: > > <:stamp:> {p} > <:delete:> {p} > > Then to do this automatically just put, [(script stampdelete)] on a > page. Of course this would just delete the page you were currently > viewing and could cause some weird affects... More likely you would > want to create an action.stampdelete page with this code: > > [(script stampdelete)] > <(forward {p})> > > And then on your page put [[{p}&action=stampdelete|stamp & delete]] > > This way the script is only executed when you click the link. > > There have not been too many posts on BoltWire's scripting engine but > it is extremely powerfully and allows you to automate any process you > can do in a form, as wild or as complex as you like. The only thing > you can't do is take user input. There's no chance to get any--the > commands execute the instant the script is called. > > Cheers > Dan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BoltWire" 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/boltwire?hl=en -~----------~----~----~----~------~----~------~--~---
