[FX.php List] [OFF] Bootstrap question
Bob Patin
bob at patin.com
Thu Dec 31 14:04:14 MST 2015
Here’s an interesting thing too; check this out:
$('.main').delegate('.cancel', 'click', function(){
$('.main').load('date.php'),function (){
alert('test');
$('.title').html('testing');
//$('#datepicker').datepicker();
}
return false;
});
I don’t even get an alert…
So I assume this means it’s not finished loading date.php? I do see the 3 elements of the date page, just not the date picker, which I was going to use the (“show”) command to load, but it never seems to finish loading…
> On Dec 31, 2015, at 3:00 PM, Steve Winter <steve at bluecrocodile.co.nz> wrote:
>
> Do you have a title element...? As in <title>...? Or did you mean .title or perhaps #title...?
>
> Steve Winter
> steve at bluecrocodile.co.nz <mailto:steve at bluecrocodile.co.nz>
> +44 777 852 4776
>
> On 31 Dec 2015, at 21:39, Bob Patin <bob at patin.com <mailto:bob at patin.com>> wrote:
>
>> So…
>>
>> I did this:
>>
>> $('.main').delegate('.cancel', 'click', function(){
>> $('.main').load(‘date.php'),function (){
>> $('title').html('testing');
>> }
>> return false;
>> });
>>
>> It should put “testing” into a DIV on my page, but not only does that happen, but nothing else I put in there works either…
>>
>> So odd. My DATE page is really simple—it calls the date picker widget and then puts up a pulldown menu and a couple of buttons…
>>
>> Here’s a thought: one of the 2 buttons calls the CANCEL function above; that can’t be causing a loop, could it?
>>
>> Should “return false” be inside the function as opposed to outside it?
>>
>> B
>>
>>
>>> On Dec 31, 2015, at 2:27 PM, Steve Winter <steve at bluecrocodile.co.nz <mailto:steve at bluecrocodile.co.nz>> wrote:
>>>
>>> Hi Bob
>>>
>>> Add the callback to the load:
>>>
>>> .load('date.php', function(){
>>> // your binding code goes here
>>> });
>>>
>>> Best I can do from the couch at 2130 on NYE ;-)
>>>
>>> Cheers
>>> Steve
>>>
>>> Steve Winter
>>> steve at bluecrocodile.co.nz <mailto:steve at bluecrocodile.co.nz>
>>> +44 777 852 4776
>>>
>>> On 31 Dec 2015, at 20:44, Bob Patin <bob at patin.com <mailto:bob at patin.com>> wrote:
>>>
>>>> Hey Steve,
>>>>
>>>> That’s what I was thinking it was… question: if I have a load() call, how do I make it so that the next calls don’t happen until the load() finishes?
>>>>
>>>> Can you show me a fast example of that? That’s exactly what I was thinking, but didn’t know how to write it…
>>>>
>>>> Thanks,
>>>>
>>>> B
>>>>
>>>>
>>>>> On Dec 31, 2015, at 1:41 PM, Steve Winter <steve at bluecrocodile.co.nz <mailto:steve at bluecrocodile.co.nz>> wrote:
>>>>>
>>>>> When does the cancel button end up in the DOM...? Is it as the result of the first load of date.php...?
>>>>>
>>>>> If so, try binding to the cancel as a callback on that load - chances are that at the point at which the bind is being called the second Ajax request hasn't completed so it fails to bind correctly.
>>>>
>>>> _______________________________________________
>>>> FX.php_List mailing list
>>>> FX.php_List at mail.iviking.org <mailto:FX.php_List at mail.iviking.org>
>>>> http://www.iviking.org/mailman/listinfo/fx.php_list <http://www.iviking.org/mailman/listinfo/fx.php_list>
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org <mailto:FX.php_List at mail.iviking.org>
>>> http://www.iviking.org/mailman/listinfo/fx.php_list <http://www.iviking.org/mailman/listinfo/fx.php_list>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org <mailto:FX.php_List at mail.iviking.org>
>> http://www.iviking.org/mailman/listinfo/fx.php_list <http://www.iviking.org/mailman/listinfo/fx.php_list>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20151231/9ca1de82/attachment-0001.html
More information about the FX.php_List
mailing list