Hi,
I have a structure similar to:
<div id="mainContainer">
<div id="emailContainer">
<div id="emailContent">
</div>
</div>
</div>
When submitting a form by piecing together the query string through
Javascript and then going to a new URL it stays within the
#emailContent div and behaves as it should e.g
loadContent('emailContent', 'email/reply_email.php?' + theURL);
But if I try and use the Jquery forms plugin (as found on
http://malsup.com/jquery/form/) it keeps breaking out of the div
structure and launching a new page e.g
$(document).ready(function() {
var options = {
target: '#emailContent'
};
// bind to the form's submit event
$('#emailForm').submit(function() {
$(this).ajaxSubmit(options);
return false;
});
});
-----------
If I go directly to the pages which create the #email related divs it
works fine, but once I use the div within a div it breaks out.
I suspect it's because the #emailContainer and then the #emailContent
have been dynamically populated rather than existing in the "parent"
page.
Is there a way of ensuring that I can target these inner divs?
Cheers,
Niggle