Hello everybody,

This question involves the following situation...

The main html page has container divs that are blank.
When the page loads, a javascript function called 'pageLoad();' is called. 
This function fills a blank div called 'top' with a form.
It does this via .load('php/dspFrontPage.php')
dspFrontPage.php contains...

<?
$toDisplay .= "<form id='submission_form'>";
$toDisplay .= "<input class='submission_firstSentence' type='text'
name='firstSentence' /><br />";
$toDisplay .= "<input type='submit' name='submit' value='Finish My Sentence'
/>";
$toDisplay .= '</form>';

echo $toDisplay;
?>

This form contains a text input and a submit button, standard stuff.

On the main html page just below pageLoad(), an event for the submission of
the form is waiting...

$("#submission_form").submit(function() {
    alert('click');
});


The .load event works just fine

The problem here is that when the form is submitted, the submit event is
never called. When I copy and paste the form into the main html page (not
using .load), everything works fine.

I'm new to the AJAX 'stuff'. Is there something I am missing? Or not getting
right?

Roy Kolak


-- 
View this message in context: 
http://www.nabble.com/loading-content-and-using-events-tf2741280.html#a7648795
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to