PDA

View Full Version : AfterValidate code error


ABC123

Peter.Wayne
08-15-2004, 02:20 PM
Hi.
I keep getting a "stack underflow" error in my AfterValidate code for a component.
I took all the code out of the AfterValidate except for the line,
response.redirect("Patient_Grid.A5W")

This is the line that causes the stack underflow error. If I remove that line, I don't get a stack underflow error, but of course the form doesn't redirect to the next page.

There [i]is a page, "Patient_Grid.a5w", and I can run that page from the browser. I also hand-coded a login form that didn't use a component and was able to use response.redirect(), but I can't seem to get it to work with a component. Has anyone else had this problem? Any ideas?
Thanks.

Selwyn Rabins
08-15-2004, 06:01 PM
you can't call
response.redirect("Patient_Grid.A5W")
directly from within a component.


instead, you must set the 'currentform.redirectTarget' property to 'patient_grid.a5w'.

if you click the 'insert' button on the code editor when you are editing the aftervalidate event, you will see this property listed.

Peter.Wayne
08-15-2004, 07:27 PM
Thank you. I didn't see that property mentioned in the documentation.