Please help with Javascript/Firefox problem

Discussion in 'HTML & Website Design' started by the_j0ker, May 9, 2008.

  1. #1
    I have a page with an iframe and there seems to be a problem with Firefox. It works fine in Safari and in IE.

    On the main page there is a form to upload a file. When uploading, the iframe (hidden with style="display:none;") loads a page which calls a javascript function that is defined on the main page. I know the iframe is loading properly (I've tested calling a top.location.href and it does change the location of the page). It just doesn't seem to be able to call my function.

    The code on the page loaded by the iframe is :

    	
    ...
    	<div id='result'><?php echo $hiddenresult; ?></div>
    	<div id='filename'><?php echo $hiddenfilename; ?></div>
    
    	<script type="text/javascript">
    	<!--
    	parent.trackThis();
    	//-->
    	</script>
    ...
    
    PHP:
    I've tried :

    window.top.trackThis();
    top.trackThis();
    window.top.document.trackThis();

    Nothing works.

    Can anyone help?
     
    the_j0ker, May 9, 2008 IP