[FX.php List] [OFF] Bootstrap question

Bob Patin bob at patin.com
Thu Dec 31 14:15:03 MST 2015


Sorry, here’s how my page is:

<DIV class=“title”>

<DIV class=“main”>

Those are basically all that are on my index page; I load stuff into MAIN, and I change the prompts in the ‘title” DIV.

So what I wanted to do was to reload my first content, which is “date.php” and then set the TITLE to its initial state…

But what I realized was that NOTHING I do in the CANCEL call is happening, except for loading the date page and showing the alert. I can’t seem to set the ‘title’ DIV, nor can I show the date picker widget… 

Another idea I had was to somehow mimic the loading of the document, so that I could call the code that occurs when one arrives at the page. Is there a way to trick the page into loading this code?

$(document).ready(function(){
	…	
});


> On Dec 31, 2015, at 3:06 PM, Steve Winter <steve at bluecrocodile.co.nz> wrote:
> 
> I'm totally lost about the structure of your document... You seem to be trying to bind to elements that are returned when you click the element...??
> 
> Steve Winter
> steve at bluecrocodile.co.nz <mailto:steve at bluecrocodile.co.nz>
> +44 777 852 4776
> 
> On 31 Dec 2015, at 22:04, Bob Patin <bob at patin.com <mailto:bob at patin.com>> wrote:
> 
>> 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 <mailto: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 <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/58d071ce/attachment.html


More information about the FX.php_List mailing list