"Edwin Martin" wrote
> Bo Rasmussen wrote:
> > "Ivo" wrote
> >>"Bo Rasmussen" wrote
> >>>URL is fired with the parameters to delete again - this sometimes gives
> >>>strange behaviour. Is there any way that I can stip of parameters when
> >>>reloading a page such that only the webpage is deleted e.g.
> >>>
> >>>http://myserver/mypage.jsp?delete=yes
>
> Another option is to do a redirect in the mypage.jsp?delete=yes page,
> for example to mypage.jsp or mypage.jsp?deleted=yes (mind the extra "d").
>
> That way a reload won't delete a thing.
No no no. You 're missing the point. It is dangerous, not to say suicidal,
to have a serverside script waiting for such url's to 'update' the database.
You never know who (or what) might read those url's because there is no
way you can keep them for yourself.
> > I can see that stuff like
> >
> > <a href=\"" + request.getRequestURI() + "?delete=yes\">
> >
> > are shattered all over the place. Is there any way that I can quickly
> > replace these with stuff that uses POST.
> >
> > I know I can insert buttons for this purpose - but isn't there a way to
> > make links that POST.
You can "document.forms['myformwithPOSTmethod'].submit()" onclick using
javascript. But I 'd see that as a temporary solution while you rewrite your
pages, as there really is no need to rely on javascript for this.
HTH
--
Ivo