Before I begin, I'm using PHP and JS lib Prototype to handle Ajax in my code.

So my problem is the following:
I'm using the following function to load a php file into a target DIV

```
   function ajaxUpdater(id, url)
{
    new Ajax.Updater('targetDiv', 'data.php', {asynchronous: true});
}

```

using the onClick function within a button, I grab the contents of data.php and display it in a DIV with the id of 'targetDiv'.

the problem is this.

There are certain things within data.php that i want to have hidden and only shown when an event is triggered.
I've been trying loads of different solutions, but nothing seems to work.
(just to add to the confusion, functions work when data.php is opened individually, but not when data.php is loaded using my ajax function.

Any help or clues or anything will be much appreciated!