ploppy 0 Newbie Poster

hi
i am hoping that i can explain my predicement properly. i have a form on a page that is working the jquery form plugin. if i use the form in a normal html environment then the form works and the success is placed in the correct div '#f1'. however, if i call the form from any modal window or box environments such as facebox or facy box etc then instead of the success being echoed to the '#f1' div it goes to the php page that does the processing and shows the response there. i hope i have made it clear and have posted my code in the hope that someone can offer some advice. many thanks

form
---------------------------------------------

<div id="addform" style="display:none;">
  <form id="fileform" action="filesadd.php" method="post" class="webform">
    <fieldset>
    <legend><span>Enter a File</span></legend>
    <label for="box">Select a Box</label>
    <select name="box">
      <option SELECTED VALUE="">Select a Box</option>
      <?php
do {  
?>
      <option value="<?php echo $row_Recordset1['boxref']?>"><?php echo $row_Recordset1['boxref']?></option>
      <?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
  $rows = mysql_num_rows($Recordset1);
  if($rows > 0) {
      mysql_data_seek($Recordset1, 0);
	  $row_Recordset1 = mysql_fetch_assoc($Recordset1);
  }
?>
      
    </select>
    <label for="fileno">File Number:</label>
    <input id="fileno" name="fileno" class="text" type="text" />
	<div id="f1"></div>
    <label for="authorised">Authorised By:</label>
    <input name="authorised" type="text" class="text" id="authorised" value="<?php echo $_SESSION['kt_name_usr']; ?>" />
    </fieldset>
    <input class="submit" type="submit"  name="submit" value="Add File" />
  </form>
</div>
open the form
--------------------------------------------------------
This is called from onpress event.

<script type="text/javascript">
function fileadd(){ 
jQuery.facybox({ div: '#addform' });
}
</script>
process the form
-------------------------------------------------------

<script type="text/javascript"> 
        // prepare the form when the DOM is ready 
// bind form using ajaxForm 
    $('#fileform').ajaxForm({ 
        // target identifies the element(s) to update with the server response 
        target: '#f1', 
 // success identifies the function to invoke when the server response 
        // has been received; here we apply a fade-in effect to the new content 
        success: function() { 
            $('#f1').fadeIn('slow'); 
        }
}); 

    </script>