View Complete Thread | FoxWeb Forum Home
Date:    Msg ID:   
From:    Thread:   
I'm finally sinking my teeth into FW v.2 and using single .asp-style .fwx scripts for every little function.  Most of my v1.29 pages come from monolithic .prg files that serve dozens of different pages.  So far, the new approach feels very comfortable.
I'm working up a model fairly similar to the ContactMine appliaction.  I've got several scripts for managing widgets:
A user working with widgets would generally progress through the pages in the order shown above.
My question resolves around widget_save.fwx.  They get here by submitting a <form action="widget_save.fwx" method="post">.
widget_save.fwx should have no output (assuming no errors occur).  It should perform a update or insert and then divert to widget_show.fwx via Server.Transfer() or Server.Execute().  (I specifically want to avoid a Response.Redirect() in this case)
In the case where the user is creating a new widget, Response.Item('id') will have a value of 0 (zero).  I won't know what the id (primary key) of the new widget is until I do the insert.  However, I'd like to have widget_show.fwx continue to get that value from Response.Item('id') to keep it as simple as possible.
What I would like to do is set the value of Response.Form('id') in widget_save.fwx before passing control off to widget_show.fwx.  It would be great if I could call something like: Response.FormSet('id', m.new_id).  Is there any way to accomplish this? 
Back in v1.29, I would change the CGIfields array manually.  I was nervous that it would bite me in the ass one day, but so far, so good.  ;-)
If this is not possible, does anyone have suggestions on other approaches to do this?  I'm a bit fuzzy on how VFP handles private/public vars across scripts and such, but I'm guessing I can find some combination to pass vars around. 
Thanks in advance,
David Hempy
Internet Database Administrator
Kentucky Educational Television
(859)258-7164  -  (800)333-9764