Re: [jQuery] Re: How to update the content of an XML node with JQuery

2009-12-01 Thread Nick Fitzsimons
's send() method [1], [2]. I don't know if jQuery supports having a DOM passed to its Ajax methods though. Regards, Nick. [1] <https://developer.mozilla.org/en/XMLHttpRequest#send()> [2] <http://msdn.microsoft.com/en-us/library/ms763706(VS.85).aspx> -- Nick Fitzsimons http://www.nickfitz.co.uk/

Re: [jQuery] Javascript Array question

2009-11-13 Thread Nick Fitzsimons
); // alerts "2" alert(example[0][3]); // alerts "undefined" alert(example[0][748]); // alerts "undefined" alert(example[0][749]); // alerts "Foo" Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

Re: [jQuery] Just discovered something

2009-10-29 Thread Nick Fitzsimons
t they already incorporate some changes which are due to arrive in the ECMAScript version 5 specification next year, which will allow such reserved words to be used in that context. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: this.remove

2009-10-19 Thread Nick Fitzsimons
t of the event, not a jQuery object. $(this).remove(); should work. Relevant jQuery docs: <http://docs.jquery.com/Events/click#fn> Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: jQuery speed seems slow

2009-10-15 Thread Nick Fitzsimons
rop into the if clause (step 9) and return, avoiding a RegExp match, assorted bits of logic and property testing, and a recursive function call. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: tag not readable in MSIE

2009-10-13 Thread Nick Fitzsimons
2009/10/13 V : > > The foklowing code works fine in Firefox, but not in MSIE; > var title = $("title").text(); > > I want to know the blabla as you can see. But MSIE does > not support this. > Is there another solution for this? > var title = document.title; R

[jQuery] Re: IE7 does not play nice with $.load

2009-10-02 Thread Nick Fitzsimons
2009/10/2 brian : > > On Fri, Oct 2, 2009 at 5:00 AM, Nick Fitzsimons wrote: >> >> 2009/10/2 Dave Methvin : >>> >>>> Is there some easy way of forcing IE to make ajax >>>> calls? >>> >>> You can use the old trick of adding a r

[jQuery] Re: IE7 does not play nice with $.load

2009-10-02 Thread Nick Fitzsimons
url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : ""); } Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Each function gives errors in IE6

2009-09-24 Thread Nick Fitzsimons
very topmost document, while "parent" will refer to the "window" object of the document containing the frame, which is not the same as "top" if you have nested frames/iframes. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Browser sniffing - the correct way?

2009-09-21 Thread Nick Fitzsimons
they are good advice: <http://www.quirksmode.org/js/support.html> Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Browser sniffing - the correct way?

2009-09-18 Thread Nick Fitzsimons
using me. Opera handles negative margins perfectly well and has done for years - the only browser I'm aware of that can have major problems with them is IE6 (and possibly 7). -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Browser sniffing - the correct way?

2009-09-17 Thread Nick Fitzsimons
avoided except as an absolute last resort. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Ajax - Access data arguments in callback

2009-09-17 Thread Nick Fitzsimons
#x27;, sentData, function( data, textStatus ) { // Here I want to access the arguments I just sent with ajax.php // As example, something like this: $('#'+ sentData.nr).attr('checked', 'checked'); } ); return false; } ); should be all you need. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: IE 8 chokes on HTML5 elements inserted with jQuery

2009-09-15 Thread Nick Fitzsimons
r container = document.getElementsByTagName("div")[0]; container.insertBefore(article, container .getElementsByTagName("h2")[1]); ... and so on. (Actually, you can use jQuery for selecting the correct insertion point and for inserting the new elements there, as jQuery can cope with elements when inserting content.) Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Ajax not working in Firefox

2009-09-10 Thread Nick Fitzsimons
t clear that the version sent by FF3 is a valid form of the header. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Ajax not working in Firefox

2009-09-09 Thread Nick Fitzsimons
owser then more digging will be required, but if it's on the server then the information about the whole request (headers and body) will help the server-side developer work out what's going on. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: HTML code inside script tag, how access to it with DOM???

2009-09-09 Thread Nick Fitzsimons
work in one browser, it may well behave differently in others. A script element can only contain script code: <http://www.w3.org/TR/html401/interact/scripts.html#edef-SCRIPT> Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Fade-in problem in IE7(urgent)

2009-09-08 Thread Nick Fitzsimons
//docs.jquery.com/Effects/fadeTo>: $(document).ready(function(){ $(".div1").fadeTo(5000, 0.5); }) but I haven't tested that. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Fade-in problem in IE7(urgent)

2009-09-08 Thread Nick Fitzsimons
2009/9/8 Rupak : > http://jsbin.com/icatu > It doesn't help that your HTML is wrong: You aren't closing the div: you need Don't know if this will fix your original problem, but it can't hurt to try :-) Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Ajax not working in Firefox

2009-09-08 Thread Nick Fitzsimons
m-urlencoded") // then do the form parsing as this would cause the problem you are seeing, and is also a broken way of parsing a request. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Anything wrong with this ajax syntax?

2009-09-08 Thread Nick Fitzsimons
o be precise, the result of the expression on the right hand side of the equals sign, which in your case is returning an object. I think you want $.ajax({ cache: false, ... which will invoke the jQuery ajax method with your object as an argument. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: not returning a JSON object

2009-09-01 Thread Nick Fitzsimons
ON parser will enforce this. Changing it to echo '{ "message": "why wont this work" }'; will fix it. Of course this may not actually fix your problem - I'm not sure how strict jQuery is about enforcing JSON parsing rules - but fixing it will elim

[jQuery] Re: $.each cannot iterator my array

2009-08-28 Thread Nick Fitzsimons
, there aren't any. Change your outermost array to an object, and it should work: var myStuff = {}; myStuff['somestring'] = []; myStuff['somestring'].push(1); myStuff['somestring'].push(2); myStuff['somestring'].push(3); $.each(myStuff, function(key, value) { alert(key + ": " + value); // shows "somestring: 1,2,3" }); Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: How to cancel an AJAX request?

2009-08-26 Thread Nick Fitzsimons
you want to abort the request, use xhr.abort(); Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Problem with Ajax Cross-Domain

2009-08-25 Thread Nick Fitzsimons
6/rfc2616-sec10.html#sec10.4.6> Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: setInterval()

2009-08-24 Thread Nick Fitzsimons
rns undefined }); }); } function joinRoom(roomId){ intvarM = window.setInterval((function(roomId) { return function() { // return a function to be used by the timer joinRoomFunction(roomId); } })(roomId), 5000); } Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: event handlers that run after the browser's default action

2009-08-21 Thread Nick Fitzsimons
(BTW, I'm curious as to why you would ever need to do this - I suspect that if you state the actual problem you're trying to solve, rather than the mechanism you thought might help you solve it, then somebody can probably suggest a different approach which will "Just Work".) Cheers, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Printing JQuery Tutorials?

2009-08-13 Thread Nick Fitzsimons
URLs and having to follow links to a "Printable version", why doesn't somebody just make the appropriate modifications to the print stylesheet at <http://docs.jquery.com/skins/common/commonPrint.css>? That's what it's for, after all ;-) Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: AJAX calls acting syncronously

2009-08-11 Thread Nick Fitzsimons
So this is just an effect of a limitation in the server-side technology, and nothing to do with the browser or jQuery. You can disable session tracking for your tests using the @ENABLESESSIONSTATE directive: <http://msdn.microsoft.com/en-us/library/ms525847.aspx>. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Sloppy Documentation of Ajax Methods

2009-08-10 Thread Nick Fitzsimons
2009/8/10 Shawn : > > ALL the functions (load, get, post, etc) are wrappers for the $.ajax() > function.  I only use $.ajax() now and tweak it to meet my needs... Makes > for less confusion. > > Ajax by default will only load files that are in the same domain as the > calling page.  This is a brow

[jQuery] Re: JQuery and XHTML in Firefox

2009-07-28 Thread Nick Fitzsimons
fine. I've also used jQuery on other XHTML pages and it worked just fine. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: order of ajax calls

2009-07-21 Thread Nick Fitzsimons
witching-functions.html> although it's pure JavaScript, not jQuery; the code is all in the page (not what I'd usually do, except for examples like this) so you can view the source to see what it's doing. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: animation is getting slower.

2009-07-17 Thread Nick Fitzsimons
ey'll take a little while to execute, even though they all do the same thing... Cheers, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Detecting a redirect response to an Ajax query

2009-07-16 Thread Nick Fitzsimons
2009/7/16 Nick Fitzsimons : > 403 Forbidden [1] Oops, forgot the link :-( [1] <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4> -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Detecting a redirect response to an Ajax query

2009-07-16 Thread Nick Fitzsimons
easier on the user. On the other hand, this may be unnecessary, overkill, or just too complex to be worth doing, depending on your application. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: why is this href firing???

2009-07-09 Thread Nick Fitzsimons
ets this wrong and has a default type of "button", just to confuse matters ;-) HTH, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: parseerror on GET from window.location

2009-06-19 Thread Nick Fitzsimons
This triggers the error callback with textStatus == "parseerror". You're specifying a dataType of "json", yet you're GETting the original HTML page in which this code is running (window.location). As HTML is not JSON, you should _expect_ a parse error. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Error in IE - Error: 'url' is null or not an object

2009-06-18 Thread Nick Fitzsimons
increasing the array's length by 1. Remove that comma and it should work. Cheers, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/