This is a little difficult to describe but here goes.  I have a tab based
widget that has parent tabs across the top and related children tabs on the
side.  There is a display area that is updated via ajax depending on the
tabs chosen.  Some of the children tabs load forms.  I'm using Drupal to
supply the application framework so the forms that are being loaded are not
directly written by me and are stripped of anything not between the body
tags.  I am using jQuery with the Form Plugin and am looking to achieve an
effect similar to http://www.malsup.com/jquery/form/#code-samples

The problem lies in the timing.  I can modify the function that serves as
the onclick for the child load to include the following:

    $('#some_form').ajaxForm(function() {
      alert('Thank you for your comment!');
    });

However, because i can not modify the onload of the form being loaded the
only way I can target the form to do something like place an alert before
the above code giving the dom time to load the form.  Once the form is
loaded everything works as expected.  Removing the alert causes the form to
be untargetable because the code executes before the form is loaded into the
dom.

I have a decently high level of experience with regular JS, but am new to
jQuery and this list ... any help is appreciated.


-- 

Kevin Bridges
http://www.kevinbridges.org/

Reply via email to