On 9/21/06, Richard White <[EMAIL PROTECTED]> wrote:
> > if you're storing data in the database, you still need to go back to
> > the server.  so you need an action page (unless you go some AJAX
> > route, i suppose).  Whether or not the action page displays anything
> > is another matter...but you'd still need an action page.
> >
> thanks for your reply.
>
> if an action page is used to only store data in the database - say for 
> example the user has just clicked a save button - and you want the user to 
> stay on the same page, does this mean that in the action page i: store the 
> data, then code the action page to go back to the page the user was just 
> working on (the page they pressed the save button).
>
> purely for aesthetics i would like the window to appear as if it has not 
> reloaded - as of course if the action page is called and then it processes 
> the information and sends the user back to the same page it would look like 
> the page has refreshed after them clicking save.

Well, from a usability perspective, you'd probably not want the page
to remain totally unchanged.  you'd probably like to give your user
some indication that the database insert/update/delete occurred
successfully.

But yes, you can easily do your database call on the action page, then
re-display the form either via a <cfinclude> or a <cflocation>.

What it sounds like you're going for (the whole "no refreshing of the
page") would be an AJAX call.  I haven't really played around much
with AJAX (other than looking a little into Spry), but others on the
list can certainly help you out there.

-- 
Charlie Griefer

================================================
"...All the world shall be your enemy, Prince with a Thousand Enemies,
and whenever they catch you, they will kill you. But first they must catch
you, digger, listener, runner, prince with a swift warning.
Be cunning and full of tricks and your people shall never be destroyed."

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253757
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to