[Pmwiki-users] 'Reset' button in edit page

Patrick R. Michaud pmichaud
Fri Jan 21 09:45:37 CST 2005


On Thu, Jan 20, 2005 at 08:55:47AM -0500, Neil Herber wrote:
> At 2005-01-19  11:41 PM -0800, Menachem Shapiro is rumored to have said:
> >In edit mode (?action-edit) there are three buttons: save, preview, and 
> >reset.
> >
> >The reset button is supposed to revert any changes made to the page.
> >However, it only works until you press preview, once you press preview
> >you can no longer reset the changes made on the page. Is this the
> >intended behaviour?
> 
> From what little I know, this is a result of the behavior of HTML forms 
> with POST arguments. The reset action causes the form to be reloaded with 
> the starting values. However, when you hit preview, PmWiki creates a new 
> instance of the page with your edits as the starting value for the text 
> area.

This is correct -- the reset button simply restores the form's contents
to whatever it had before the user started changing things.  Pressing
preview causes the server to send a new copy of the form (which "Reset"
then restores to).  To get back to the current stored version of the
document w/o any previous, just hit the "Edit Page" link again.

The Reset button itself is just something provided by HTML that has
hung around since the first versions of PmWiki.  Several have commented
in the past that perhaps we should eliminate the Reset button entirely
(I hardly ever use it myself).

Pm



More information about the pmwiki-users mailing list