I have a form that looks exactly like the manage_addImageForm, except that it has a hidden field, goto, which contains a url. The form posts to a method called myCreateImage myCreateImage looks like this <dtml-call "manage_addImage"> <dtml-call "RESPONSE.redirect(goto)"> Everything executes error free, but no new image gets created. The redirection does occur, however. I purposely have no try/catch clause, hoping to spot an exception. no luck. any ideas? I am logged in as superuser, so it is not a permissions problem. I had similar problems trying to create an instance of a ZClass product, only I couldn't even figure out how to call the manage_addProduct function. I wound up solving the problem with some unbelievably ugly code in the myClass_add function which detects how it is being added and redirects users to different places, etc. It was made particularly hard because I wanted to be able to create an instance of another ZClass inside my newly created ZClass some of the time. I finally did it with a very ugly redirect call. There must be another way!!! --sam
Saturday, December 25, 1999, 6:13:07 AM, Sam Gendler wrote: SG> I have a form that looks exactly like the manage_addImageForm, except that it SG> has a hidden field, goto, which contains a url. The form posts to a method SG> called myCreateImage SG> myCreateImage looks like this SG> <dtml-call "manage_addImage"> SG> <dtml-call "RESPONSE.redirect(goto)"> SG> Everything executes error free, but no new image gets created. The redirection SG> does occur, however. I purposely have no try/catch clause, hoping to spot an SG> exception. no luck. That's because you are calling the method definition of manage_addImage, not the method itself. Change it to one of the following: <dtml-call manage_addImage> <dtml-call "manage_addImage(id='', file=REQUEST.file)"> -- Best regards, Martijn Pieters mailto:mj@digicool.com
participants (2)
-
Martijn Pieters -
Sam Gendler