unable to trigger jquery-specific events
-
Thatcher
ah because envjs uses a synchronous loading process during window.location =
'', your jquery ready function is not defined until after ready has been triggered. try one of these solutions (both should work, if not please post
back to this ticket)1) set window.location at the end of your script, not the beginning
2) manually trigger ready with jQuery.ready()
Hope that helps
Thatcher
-
jhemminger
I modified my script:
load('lib/env.rhino.js');
load('lib/jquery/jquery-1.3.2.js');
$(document).ready(function() {
var requestURL = "http://twitter.com/statuses/user_timeline/femurchasm.json?callback=?"; print('requestUrl: ' + requestURL); $.getJSON(requestURL, function(json, status) { print('here'); $.each(json, function(i) { print(this['text']); }); });});
window.location = "index.html";
and I receive the following output:
$ java -jar lib/env-js.jar twit.js js: uncaught JavaScript runtime exception: TypeError: Cannot read property "compareDocumentPosition" from null
js: uncaught JavaScript runtime exception: TypeError: Cannot find function ready in object [object Object].
-
Thatcher
- State changed from new to open
- Milestone set to 1.1 Release
[responsible:id#36440 state:"open" milestone:id#49862 bulk edit command]
-
Thatcher
I believe you may be using an early version of jquery 1.3.2 This error was seen with early versions and does not appear in the latest.
-
Thatcher
- State changed from open to resolved
pretty sure this is resolved so I'm going to close. feel free to ping us if it's still not working for you.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.