Also, in PHP related advice, *ereg *and *split* are deprecated. if you
turned on your PHP errors and use E_ALL, it will throw back errors.


Rick

On Sun, Dec 6, 2009 at 6:36 PM, Rick Waldron <[email protected]> wrote:

> Actually, my reasoning for that response was a fluke, so ignore it
>
>
> the problem: you're calling "*this*.deleteform()"
>
> I noticed you use all kinds of alert()'s for debugging... i'd recommend
> learning firebug and making it your very best friend. Firebug told me that "
> *this*" IS NOT *pb_editloc*, its actually *window*
>
> so... replace
>
> *this*.deleteform()
>
> with:
>
> *pb_editloc*.deleteform();
>
> And it works perfectly.
>
>
> Also, can i recommend that you don't use body onload="foo()"... its silly
> to wait that long to start doing your DOM work. I dropped the onload=""
> attribute, and commented out the function it called (might as well delete
> it), but copied the body of it into document.observe('dom:loaded')
>
> Also... I made some suggestions in here. Find them in *bold*
>
> document.observe('dom:loaded', function () {
>
> *  // Mixing elderly events with Prototype is sloppy.
>   //window.onresize= winResize;
>   document.observe('resize',winResize);
> *
>   winResize();
>
>   pb_editloc.initialize();
>
>   var latlng = new google.maps.LatLng(51.64, 0);
>   var myOptions = {
>     zoom: 8,
>     center: latlng,
>     mapTypeId: google.maps.MapTypeId.ROADMAP
>   };
>   map = new google.maps.Map($("map_canvas"), myOptions);
>
>   // Click Listener
>   google.maps.event.addListener(map, 'click', function(event) {
>     if (pb_editloc.editmode){
>       pb_editloc.clicked(event.latLng);
>     }
>   });
>
>
>   // Insert sidebar
> *
> **  var newDiv = document.createElement("div");
>   newDiv.innerHTML = "";
>   newDiv.id ="pb_sidebar";
> **  $("pb_rightbar").appendChild(newDiv);
> **
> /*
> **//  Why not use:
> **  $("pb_rightbar").insert(
>     new Element('DIV', {id: 'pb_sidebar'})
>   );
> */
> *
>
>   // Insert loc box (Shows current location)
>   pb_locbox.initialize('pb_locbox','pb_bottombar');
>
>   // Insert zoom box (Shows current zoom)
>   pb_zoombox.initialize('pb_zoombox','pb_bottombar');
>
>   // Insert zoom box (Shows current zoom)
>   pb_zoombox.initialize('pb_wipe_database','pb_bottombar');
>
>   //Insert Add button
>   insertHtmlFromTemplate("pb_add_location_button","pb_map_controls");
>
>
>   readLocations();
> });
>
>
>
>
>
> On Sun, Dec 6, 2009 at 6:11 PM, Rick Waldron <[email protected]>wrote:
>
>> The problem is that when the dom is loaded... there is no such thing as
>> "pb_add_location".
>>
>>
>>
>>
>>
>>
>>
>> On Sun, Dec 6, 2009 at 5:09 PM, T.J. Crowder <[email protected]>wrote:
>>
>>> Hi,
>>>
>>> > Just tried onComplete - no joy
>>>
>>> You probably don't want onComplete. onComplete is called regardless of
>>> whether the request was successful. You probably want onSuccess and
>>> onFailure, doing different things.
>>>
>>> -- T.J.
>>>
>>> On Dec 6, 7:25 pm, evilC <[email protected]> wrote:
>>> > Just tried onComplete - no joy
>>> >
>>> > I uploaded a copy tohttp://www.evilc.com/pb/pb.zip, should anyone be
>>> > so kind as to be inclined to take a look at it.
>>> >
>>> > If you have a localhost LAMP server (I use XAMPP) with default sql
>>> > account of root/<blank> , it will work without any modifications -
>>> > just create a database called placebook and inject the sql from the
>>> > install folder. Else you may need to edit config.php if you have
>>> > different db settings.
>>>
>>> --
>>>
>>> You received this message because you are subscribed to the Google Groups
>>> "Prototype & script.aculo.us" group.
>>> To post to this group, send email to
>>> [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected]<prototype-scriptaculous%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>>>
>>>
>>>
>>
>

--

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.


Reply via email to