Can someone point out the (I'm sure) obvious thing I'm missing to get
a view to load in an iframe?
I'm trying to create an interface to SwiftMailerComponent which has
batch sending capabilities. It can also print out a progressive list
of recipients and whether the message was successfully sent or not.
This is handy in case the batch fails for some reason--the list of
successful recipients up until that point will be printed out already.
So, what I'm trying to do is to load the message form inside of an
iframe so that the submit won't refresh the page and SwiftMailer's
progressive output can be received. I have to use an iframe because
ajax won't deal with the progressive output (correct me if I'm wrong).
The situation looks like this:
admin.ctp [ layout ]
admin_contact.ctp [ action view ]
iframe [ url: /admin/members/contactForm ]
admin_contact_form.ctp [ form view ]
There's also a 'contact_form' layout, which is just a basic wrapper to
complete the form HTML page.
admin_contact.ctp contains:
<iframe name="contact_frame" id="contact_frame" src="<?=
Router::url(array('controller' => 'members', 'action' =>
'contactForm', 'admin' => 1), true) ?>" width="100%"
height="600"></iframe>
The created url looks good.
In MembersController, I have an admin_contact() method to deal with
sending the message. When there's no data, it simply renders the main
view.
The only way I could think to get the iframe contents rendered was to do this:
public function admin_contactForm()
{
$this->layout = 'contact_form';
$this->render('admin_contact_form');
}
But I'm not seeing anything, including the layout contents. I stuck a
Debugger::log in there but not a peep. And no errors, either.
And, if anyone can think of a better way (anything that works,
actually) I'm all ears.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---