[Pmwiki-users] Leaving Edit page confirmation...

Knut Alboldt pmwiki
Thu Dec 2 10:20:26 CST 2004


Ciaran wrote:
> Hi, 
> Is it possible to Popup a confirmation when a user tries to exit an
> editing action? 

instead of submitting the edit-form you could start a javascript-function which
shows an alert / querybox and submits or cancels the edit.
But that requires that javascript os switched on at the browser.

Second:
implement a new action, e.g. "editcomfirm", change the submit-action from "edit" 
to "editconfirm". HandeEditcomfirm displayes another form with buttons like
"save changes"   "forget my last input"  "what the hell are you asking ?"
(ok, maybe you can skip the last button :-)

and _all_ other edit-page-fields as hidden fields.
The "save changes" button is then the original edit-submit-button.
Submitting that form will call action=edit with post=1 (or another var that 
tells pmwiki to store the edited data, forgot the name, have to lokk it up)
(ok, sounds a bit complicated, but that should not be hard to implement)
This will work without any javascript

Knut



More information about the pmwiki-users mailing list