I am using Firebug, and everything works fine in FF, Safari, Opera,
and even IE 8. Something about IE 7 though is throwing that error and
I can't for the life of me track what it is. :(
On Nov 17, 9:19 am, Michel Belleville michel.bellevi...@gmail.com
wrote:
Well, when I've got an error saying
I am using Firebug, and everything works fine in FF, Safari, Opera,
and even IE 8. Something about IE 7 though is throwing that error and
I can't for the life of me track what it is. :(
On Nov 17, 9:19 am, Michel Belleville michel.bellevi...@gmail.com
wrote:
Well, when I've got an error saying
Could it have something to do with the 'data' variable not being
available to the function that I have placed inside the $.getJSON
call? Is there a way to force it to pass on/be available to my
ppButton.click(...) function? This is all I can think of for now.
Oh, yeah, now I see.
Of course data is probably not what you expect where you're reading it. Why
would it ? It's set in a callback as a function's parameter, it's not meant
to get out of the callback's scope, and even when it would, you don't know
when the callback is triggered, that can be right
So I guess that is the problem then? How would I work towards a
solution in making 'data' available to that .click() function?
On Nov 17, 10:02 am, Michel Belleville michel.bellevi...@gmail.com
wrote:
Oh, yeah, now I see.
Of course data is probably not what you expect where you're reading it.
Well, you can call the click method inside the getJSON callback, that's the
most straightforward way to do it, and probably the cleanest.
Michel Belleville
2009/11/17 roryreiff roryre...@gmail.com
So I guess that is the problem then? How would I work towards a
solution in making 'data'
No, the scope of the data parameter is not the problem. The data parameter
is already in scope inside your click handler. (Michel, check the code
carefully - don't you agree? The click handler is nested inside the getJSON
callback.)
If it were broken in IE8 as well as IE7, then I would guess that
Clicking on the first link (i.e. a href=0/a):
http://pomona.edu/dev/home/0
string
[object Object]
[object Object], [object Object], [object Object], [object Object],
[object Object]
5
I think the problem is in my var aIndex = $(this).attr('href');
In IE 7 it is appending the full URL...any
2009/11/17 Michael Geary m...@mg.to
No, the scope of the data parameter is not the problem. The data parameter
is already in scope inside your click handler. (Michel, check the code
carefully - don't you agree? The click handler is nested inside the getJSON
callback.)
Apparently. Indenting
That is odd. jQuery's attr() method goes to some amount of work to try to
get the raw content href attribute ('0') instead of the fully qualified URL.
But it all boils down to a .getAttribute('href',2) call on the DOM element.
An interesting test would be to replace this line:
var
I am using v1.3.2
I replaced var aIndex = $(this).attr('href'); with var aIndex =
+this.href.match( /\d+$/ )[0]; and it works now. Thanks for the help!
11 matches
Mail list logo