[Pro] Ajax PHP Mysql - need help

Walt,
Made your suggested changes. Still works in Firefox & IE. Safari’s error message now reads.

You don’t have permission to access /fanmail/.html on this server.

Looks like the evt.element().id is null. But, why? It is currently id=“fm_2010_01_01”

Anything else up your magical sleeve? Thanks. Jan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Okay, let’s try one additional step. Maybe the chaining part is
failing here. Either one of these or the other, but not both, may work:

var file = this.id + '.html';

var elm = evt.element();
var file = elm.id + '.html';

See if either one brings you joy in Safari.

Walter

On Mar 12, 2010, at 5:22 PM, jan smoot wrote:

Walt,
Made your suggested changes. Still works in Firefox & IE. Safari’s
error message now reads.

You don’t have permission to access /fanmail/.html on this server.

Looks like the evt.element().id is null. But, why? It is currently
id=“fm_2010_01_01”

Anything else up your magical sleeve? Thanks. Jan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Oh, and don’t forget to put the folder name at the beginning as I
mentioned previously, I left that part out here.

Walter

On Mar 12, 2010, at 6:05 PM, Walter Lee Davis wrote:

Okay, let’s try one additional step. Maybe the chaining part is
failing here. Either one of these or the other, but not both, may
work:

var file = this.id + ‘.html’;

var elm = evt.element();
var file = elm.id + ‘.html’;

See if either one brings you joy in Safari.

Walter

On Mar 12, 2010, at 5:22 PM, jan smoot wrote:

Walt,
Made your suggested changes. Still works in Firefox & IE. Safari’s
error message now reads.

You don’t have permission to access /fanmail/.html on this server.

Looks like the evt.element().id is null. But, why? It is currently
id=“fm_2010_01_01”

Anything else up your magical sleeve? Thanks. Jan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walt,

Things have gone awry on me! I had a system crash (needed a new battery) So I have had to recreate some of this. Before - I was having trouble getting the listener to work in Safari. I have backslid…

The page behavior is: nothing shows up in the scrolling content box - initially I have filled through a .inc. But - I see the content that should be displayed in the page source. pagename has a .shtml

I have made sure the lightbox function is gone. I have closed and restarted Freeway. I have republished everything.

I am using Protaculous with prototype.packed with the listener code as:

$$(‘button.thisbutton’).invoke(‘observe’,’click’,function(evt){
evt.stop();
var file = ‘fanmail/’ + evt.element().id + ‘.html’;
new Ajax.Updater(‘content’, file, { parameters:{ method:’get’ }
});
});

Button html is:
Current Mail

I am stumpted. Seems like some type of library conflict?

Other info about the page…

I am also using an accordian (settings=on pageload, slide up, some hidden some visible) along with a form and the include file shown in a scrolling box. The accordian is initially all open - which it shouldn’t be. I can close them though. It is functional, just doesn’t display correctly on page load.

Any help you can offer would be so appreciated. Otherwise, I guess I just start taking things off the page to debug? Welcome your input.
Jan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Wow, tough luck!

On Mar 24, 2010, at 4:17 PM, jan smoot wrote:

Walt,

Things have gone awry on me! I had a system crash (needed a new
battery) So I have had to recreate some of this. Before - I was
having trouble getting the listener to work in Safari. I have
backslid…

The page behavior is: nothing shows up in the scrolling content box

  • initially I have filled through a .inc. But - I see the content
    that should be displayed in the page source. pagename has a .shtml

And you are sure that other Server Side Includes work correctly (i.e.
that your server is configured to allow this)? And you aren’t trying
to preview this on your computer (where SSI won’t work at all, except
in Web Sharing with some tweaking of the configuration files).

I have made sure the lightbox function is gone. I have closed and
restarted Freeway. I have republished everything.

I am using Protaculous with prototype.packed with the listener code
as:

$$(‘button.thisbutton’).invoke(‘observe’,’click’,function(evt){
evt.stop();
var file = ‘fanmail/’ + evt.element().id + ‘.html’;
new Ajax.Updater(‘content’, file, { parameters:{ method:’get’ }
});
});

there’s your problem right there. method:‘get’ should not be inside
the parameters hash, sorry if I mis-typed that earlier in this
process. Make your function look like this:

$$(‘button.thisbutton’).invoke(‘observe’,’click’,function(evt){
	evt.stop();
	var file = 'fanmail/' + evt.element().id + '.html';
	new Ajax.Updater(‘content’, file, { method:’get’ });
});

Button html is:
Current Mail

This is all fine.

I am stumpted. Seems like some type of library conflict?

Other info about the page…

I am also using an accordian (settings=on pageload, slide up, some
hidden some visible) along with a form and the include file shown in
a scrolling box. The accordian is initially all open - which it
shouldn’t be. I can close them though. It is functional, just
doesn’t display correctly on page load.

Is this accordion built with the Freeway FX Actions, my
ScriptAccordion Action, or was it made using the MooTools kit from
Weaver? Either the first or second are fine, but the third option
would be really a bad idea and nothing on the page would work at all.

Any help you can offer would be so appreciated. Otherwise, I guess I
just start taking things off the page to debug? Welcome your input.

Get a copy of Firebug and install it in Firefox. View your site while
Firebug is running and its console tab is open. You might not
understand the error messages when they happen, but at least you’ll
have something to start googling with or be able to post what the
error says and get some more help here. JavaScript is a cruel
mistress, but very very powerful.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Some Progress!
I had an apostrope character not a ’ in the observer code… I knew something was screwing everything up! Fixing this cleared up everything.

So, now. I am back to the problem that the listener function isn’t working Safari. Getting a:

FORBIDDEN
You don’t have permission to access /alphasite/fanmail/.html on this server.

I tried your suggestion (in your 12 Mar reply)
var elm = evt.element(); var file = elm.id + ‘.html’;
(beware - your code has the dreaded ’ ‘ not ’ in it!

Any other ideas? Sticky wicket!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you read the error message, it’s saying pretty clearly that the ID
value is not there, since it’s asking for the file named .html rather
than some_id.html. How did you make your buttons? Check them carefully
to see whether they have the ID property properly coded. If they
don’t, that’s your problem.

Walter

On Mar 25, 2010, at 12:24 AM, jan smoot wrote:

Some Progress!
I had an apostrope character not a ’ in the observer code… I knew
something was screwing everything up! Fixing this cleared up
everything.

So, now. I am back to the problem that the listener function isn’t
working Safari. Getting a:

FORBIDDEN
You don’t have permission to access /alphasite/fanmail/.html on this
server.

I tried your suggestion (in your 12 Mar reply)
var elm = evt.element(); var file = elm.id + ‘.html’;
(beware - your code has the dreaded ’ ‘ not ’ in it!

Any other ideas? Sticky wicket!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This is the button code

January 2010

This is the listener code:

$$(‘button.thisbutton’).invoke(‘observe’,‘click’,function(evt){
evt.stop();
var elm = evt.element();
var file = ‘fanmail/’ + elm.id + ‘.html’;
new Ajax.Updater(‘content’, file, { method:‘get’ } );
});

Works fine in Firefox and IE - but not Safari. You had suggested this additional step earlier…

On Mar 12, 2010, at 6:05 PM, Walter Lee Davis wrote:

Okay, let’s try one additional step. Maybe the chaining part is failing here. Either one of these or the other, but not both, may work:

var file = this.id + ‘.html’;

var elm = evt.element(); var file = elm.id + ‘.html’;

See if either one brings you joy in Safari.

Walter

On Mar 12, 2010, at 5:22 PM, jan smoot wrote:

    Walt, Made your suggested changes. Still works in Firefox & IE. Safari’s error message now reads.

    You don’t have permission to access /fanmail/.html on this server.

    Looks like the evt.element().id is null. But, why? It is currently id=”fm_2010_01_01”

    Anything else up your magical sleeve? Thanks. Jan

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walt,

I decided to try your last suggestion - never give up!!

Don’t know why, but this fixed it:

var elm= ‘fanmail/’ + this.id + ‘.html’;

You have been so very helpful. Thank you.

Jan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Try adding a line to your script, after the var elm line:

console.log(elm.id);

In Safari, enable the Develop menu in the main preferences (Advanced
tab) if it isn’t already.

From the Develop menu, choose Show Error Console and move this new
window somewhere that you can see the entire thing while Safari has
your page loaded.

Reload the page. If you see any errors in the Error Console, please
note what they are.

Click one of the buttons, and see what (if anything) is printed to the
console.

If you don’t see anything, then remove the parameter .id from the
statement, so it reads only

console.log(elm)

and see what if anything is printed when the button is pressed.

Post back with your results. This really should just work, and I’m
surprised it hasn’t.

Walter

On Mar 25, 2010, at 11:06 AM, jan smoot wrote:

This is the button code

January 2010

This is the listener code:

$$(‘button.thisbutton’).invoke(‘observe’,‘click’,function(evt){
evt.stop();
var elm = evt.element();
var file = ‘fanmail/’ + elm.id + ‘.html’;
new Ajax.Updater(‘content’, file, { method:‘get’ } );
});

Works fine in Firefox and IE - but not Safari. You had suggested
this additional step earlier…

On Mar 12, 2010, at 6:05 PM, Walter Lee Davis wrote:

Okay, let’s try one additional step. Maybe the chaining part is
failing here. Either one of these or the other, but not both, may
work:

var file = this.id + ‘.html’;

var elm = evt.element(); var file = elm.id + ‘.html’;

See if either one brings you joy in Safari.

Walter

On Mar 12, 2010, at 5:22 PM, jan smoot wrote:

   Walt, Made your suggested changes. Still works in Firefox &  

IE. Safari’s error message now reads.

   You don’t have permission to access /fanmail/.html on this  

server.

   Looks like the evt.element().id is null. But, why? It is  

currently id=”fm_2010_01_01”

   Anything else up your magical sleeve? Thanks. Jan

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options