Webdata blade and variable scope
Posted in 2000
Topics: General Discussion
This is doing my head. I have the following (pseudo) code within a self referenceing page, ie the POST acts back on the original page if not set set addstatus=0 disp A:addstatus if (Post) Post it if ok set addstatus=1 else set addstatus=2 set method post disp B:addstatus if (Get) disp C:addstatus set method post passing addstatus as a hidden field The first pass I get A:0 C:0 B:1 The second pass I get A:0 C:1 B:1 The third pass I get A:1 C:1 B:1 Forcing a fail I get A:1 C:1 b:2 then A:1 C:2 B:2 Basically the addstatus seems to be one iteration behind what I expect at the start of the page. Any ideas???? This is giving me real grief -- Paul Watson # WF Software Ltd # You are only young once Tel: +44 1436 674729 # but you can be immature Fax: +44 1436 678693 # for ever www.wfsoftware.com #
Ok I put my brain in gear - doh!!!! Paul Watson wrote: > > This is doing my head. I have the following (pseudo) code within a > self referenceing page, ie the POST acts back on the original page > > if not set set addstatus=0 > disp A:addstatus > if (Post) > Post it > if ok > set addstatus=1 > else > set addstatus=2 > set method post > disp B:addstatus > if (Get) > disp C:addstatus > set method post passing addstatus as a hidden field > > The first pass I get > A:0 > C:0 > B:1 > > The second pass I get > A:0 > C:1 > B:1 > > The third pass I get > A:1 > C:1 > B:1 > > Forcing a fail I get > A:1 > C:1 > b:2 > > then > A:1 > C:2 > B:2 > > Basically the addstatus seems to be one iteration behind what I expect > at the > start of the page. > > Any ideas???? This is giving me real grief > > -- > Paul Watson # > WF Software Ltd # You are only young once > Tel: +44 1436 674729 # but you can be immature > Fax: +44 1436 678693 # for ever > www.wfsoftware.com # -- Paul Watson # WF Software Ltd # You are only young once Tel: +44 1436 674729 # but you can be immature Fax: +44 1436 678693 # for ever www.wfsoftware.com #