[Zope] confirmation or redirect
Bo M. Maryniuck
b.maryniuk@forbis.lt
Mon, 29 Jul 2002 15:13:11 +0200
On Monday 29 July 2002 14:18, Stephan Goeldi wrote:
> OK. It was suggested, that I need to use JavaScript to confirm the dele=
tion
> of an object.
Umm... No. Why you should use this "JavaScript masturbation"? (sorry, thi=
s=20
phrase is taken from ESR essays :) -- no offence. To make yet another one=
=20
lynx-incompatible site which is *REQUIRED* JavaScript turned on? IMHO, it=
is=20
much better to use a form in page from you want to delete something:=20
<form action=3Dconfirmator method=3Dpost>.=20
=2E..and a method "confirmator" with form you want to use for real delete=
=2E..:
<form action=3DdeleteReally method=3Dpost>
<input type=3Dhidden value=3D<dtml-var id>
<input type=3Dsubmit value=3D"Delete">
</form>
<form action=3Dindex_html method=3Dpost>
<input type=3Dsubmit value=3D"Cancel">
</form>
=2E..and a method "deleteReally" where you delete your document forewer, =
which=20
is actually delete method for any stuff you want and available only for v=
alid=20
users. Yes, user will load three pages, not two. Yes, user will wait for=20
page, if page will be bloated by not needed graphics and banners. Yes, us=
er=20
can "back". But this WILL work on ANY browser what is main goal, I think.=
=2E.
P.S. Surely, this example is a _way_, not an implementation! ;-)
--=20
Sincerely yours, Bogdan M. Maryniuck
Microsoft is not the answer.
Microsoft is the question.
NO (or Linux) is the answer.
(Taken from a .signature from someone from the UK, source unknown)