You are here: Re: [PHP] Submit/Validate triggering problem. « PHP « IT news, forums, messages
Re: [PHP] Submit/Validate triggering problem.

Posted by "Richard Lynch" on 10/23/05 06:36

On Fri, October 21, 2005 10:51 am, Uros Dukanac wrote:
> I can make "workaround" by checking the value of $Filter (is it "A" or
> "B") to
> determine which button sent a request (see "Workaround code" after
> "Original
> code"), but it looks "dirty" to me, and I'm wondering why to do that

It's pretty standard to check which button was pressed by what values
are sent from the browser.

That's just how it's done.

> if ($AForm->validate() && Filter == "A")

I got no clue what all the QuickForm and validate() stuff is doing,
but you may not really care about validate() here unless $Filter ==
'B'...

So I'd maybe switch the order of the tests and put $Filter first.

Or maybe you always want validate() for A to run, even when they don't
click on A?

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация