Although the component (i.e., LOAD) is not initially an Ajax component, 
because you have ajax_trap=True, it becomes an Ajax component upon form 
submission (i.e., the form is submitted via Ajax, and the post-submission 
response is loaded into the component target via Ajax). Your "click" event 
handler is only set once when the page initially loads, so after a form 
submission, the new content of the component has no "click" handler 
attached. Instead, you should use the new jQuery.on() (which is recommended 
instead of .live() or .delegate() -- see http://api.jquery.com/on/) to 
attached the click event.

Anthony

On Tuesday, March 13, 2012 4:15:57 PM UTC-4, Sushant Taneja wrote:
>
> Sorry, but I didn't get you.
>
> As per my understanding the component is loaded with option ajax=False, 
> thus it will load with rest of the page.
> The <script> tag for inclusion of the JS file is just above the closing 
> body tag (</body>) and after the LOAD call.
> Also the flip works until the forgot password form is submitted.
>
> The problem occurs after forgot password form is submitted once.
> So essentially the JS file is already there, only the form is re-loading.
>
> Let me know if I am wrong somewhere. 
>
> On Wednesday, March 14, 2012 1:34:21 AM UTC+5:30, rochacbruno wrote:
>>
>>
>>
>> On Tue, Mar 13, 2012 at 4:35 PM, Sushant Taneja <
>> sushant.tanej...@gmail.com> wrote:
>>
>>> $(function(){
>>>     $('.flipLink').click(function(e){
>>>     $('#formContainer').toggleClass('flipped');
>>> $('.flash').hide('slow');
>>> })});
>>>
>>
>> The problem is that this JS is loaded before the ajax component, you have 
>> to bind the event using .live .bind or .on
>>
>> example:
>>
>> *$(document).on("click", ".flipLink", function(event){
>>      $('#formContainer').**toggleClass('flipped');**
>>         $('.flash').hide('slow');**
>> });*
>>
>>
>>
>> -- 
>>
>> Bruno Rocha
>> [http://rochacbruno.com.br]
>>
>>

Reply via email to