My script is now:
<script type="text/javascript">
$('#page_modal').jqm();
$('#preview_btn').click(function(e){
$('#ajaxForm').ajaxSubmit({
url: '/admin/pages/preview',
error: function(XMLHttpRequest, textStatus, errorThrown)
{
alert(textStatus);
},
success: function(responseText){
$
('#page_modal').jqmShow().find('#page_modal_content').html(responseText);
}
});
e.preventDefault();
});
</script>
When I click Preview, I get the preview page in a modal dialog.
However, (1) it messes up the page layout, and (2) it doesn't have the
new information, even though the controller should be saving this and
then reading it in to populate the page. But it's nearly there..!
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment