Question: A word before my question to say I am pretty new to OOP in PHP, and I'm very grateful to the site, and you all for reading - and sometimes answering beautifully (as you can see [here](https://stackoverflow.com/questions/5596895/php-database-class) or [here](https://stackoverflow.com/questions/5622605/php-getting-a-reference-through-a-constructor), or even [here](https://stackoverflow.com/questions/4907018/building-a-factory-in-php)) and helping big time my late (sort of) improvement dealing with classes. 

All my previous questions lead me today to this one:  

**In a class extending PDOStatement, how can I trigger a default action each time one of the parent public methods is called?** 

I can do this:

```
class genc_query extends PDOStatement{
  public function rowCount(){
    $this->myDefaultAction();
    return parent::rowCount();
  }
}

```

But as I need to change in the same way almost all of the native methods, I wonder if there's no way to trigger a function like \_\_call() as if these methods were private (as it's not possible to make them private).

Answer: 
Add this to the button.

```
onclick="this.disabled=true;"

```

Example:

```
<input type="submit" onclick="this.disabled=true;" />

```
I've never tried it before, but I think this topic could be useful: [jquery/JavaScript - Delay until upload complete](https://stackoverflow.com/questions/5460290/jquery-javascript-delay-until-upload-complete)