Skip to content

Instantly share code, notes, and snippets.

@shamun
Created July 27, 2011 08:58
Show Gist options
  • Select an option

  • Save shamun/1108960 to your computer and use it in GitHub Desktop.

Select an option

Save shamun/1108960 to your computer and use it in GitHub Desktop.
1. After submit it alerts undefined
2. Inside the frame i have the real results
3. How can i get the output of /a/filejax
<script type="text/javascript">
$(document).ready(function()
{
$('#files1').live("submit",function(e)
{
$('#file1').load(function(){
alert ( $('#file1').contents().find('body').html() );
});
});
});
</script>
<form name="files1" id="files1" method="post" action="/a/fileajax" target="file1" enctype="multipart/form-data">
<?= $this->formFile('moreattachment[]', array('class' =>'attachment', 'id'=>'attachment') ); ?>
<iframe id="file1" name="file1" frameborder="0" src="javascript: '<html> </html>';" ></iframe>
<input type="submit" name="submit" class="ajaxupload" />
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment