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