[jQuery] $(select, xml) issue in 1.1?
The following selector works in 1.04 but not in 1.1: $(viewentry/[EMAIL PROTECTED]'0'], xml) Link with jQuery 1.04: http://64.26.160.80/jQueryTest.nsf/jQuery104?OpenForm Link with jQuery 1.1 (Rev: 1073): http://64.26.160.80/jQueryTest.nsf/jQuery11?OpenForm Link to an XML file that $.ajax() function retrieves: http://64.26.160.80/jQueryTest.nsf/Users?ReadViewEntries Another thing... code (with 1.04) works in IE6, IE7 Opera 9, but does not work in Firefox 2.0.0.1. Not sure if I'm doing something wrong, so any help is appreciated. -- View this message in context: http://www.nabble.com/%24%28select%2C-xml%29-issue-in-1.1--tf3051121.html#a8481430 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $.ajax call works with 1.04 but not with 1.1
Jörn, I found out that when I use 1.04 a 'test' variable gets a list of the user names, but when I switch to 1.1 it gets value. var test = $(/viewentries/viewentry/[EMAIL PROTECTED]'1'], xml).text(); Jörn Zaefferer wrote: Sasha Oros schrieb: By the way, all the variable values (url, columnNo elementID) are the same for both jQuery libraries. Can you post a test page? Can't spot any obvious errors in your code. -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/%24.ajax-call-works-with-1.04-but-not-with-1.1-tf3016787.html#a8417846 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] $.ajax call works with 1.04 but not with 1.1
Hi, Below ajax call works fine with jQuery 1.04 and returns sets multi-value to an input text field. But, when I try the same code with jQuery 1.1 it fails without any error (no error message, no result,... nothing happens). Not sure if I missed anything (regarding to upgrade changes), so any help is greatly appreciated. $.ajax({ type: 'GET', url: url, dataType:'xml', timeout: 1, async: true, success: function( xml ) { var result = []; $(viewentry/[EMAIL PROTECTED]' + columnNo + '], xml).each( function(i) { var $this = $(this); result[i] = $this.text(); }); var element = $(# + elementID); if ( element.attr(type) === null ) { element.html( result ); } else { element.val( result ); } }, error: function( xml ) { alert( Error ); } }); By the way, all the variable values (url, columnNo elementID) are the same for both jQuery libraries. Thanks, Sasha -- View this message in context: http://www.nabble.com/%24.ajax-call-works-with-1.04-but-not-with-1.1-tf3016254.html#a8376407 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] $.ajax call works with 1.04 but not with 1.1
Hi, Below ajax call works fine with jQuery 1.04 and returns sets multi-value to an input text field. But, when I try the same code with jQuery 1.1 it fails without any error (no error message, no result,... nothing happens). Not sure if I missed anything (regarding to upgrade changes), so any help is greatly appreciated. $.ajax({ type: 'GET', url: url, dataType:'xml', timeout: 1, async: true, success: function( xml ) { var result = []; $(viewentry/[EMAIL PROTECTED]' + columnNo + '], xml).each( function(i) { var $this = $(this); result[i] = $this.text(); }); var element = $(# + elementID); if ( element.attr(type) === null ) { element.html( result ); } else { element.val( result ); } }, error: function( xml ) { alert( Error ); } }); By the way, all the variable values (url, columnNo elementID) are the same for both jQuery libraries. Thanks, Sasha -- View this message in context: http://www.nabble.com/%24.ajax-call-works-with-1.04-but-not-with-1.1-tf3016256.html#a8376410 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Cannot retrieve $.post( ) response
Hi, I'm trying to use an ajax post request and not sure why is not working. Code in a button: $.post( HTMLTestPage.htm, { employeeID: 007, requestType: R }, function(xml){ alert( xml ); alert( BankName = + $(#BankName, xml).val() ); } ); The 'HTMLTestPage.html' is an html page (not xml). When I click on the button the first alert returns the whole page and I can see the source code, id=BankName and value for the field, but the second alert returns an empty string. I tried using the text() and html() function, but the outcome was the same. By the way, when I created a test button on the 'HTMLTestPage.html' with 'alert( $(#BankName ).val()' it worked and I got the value displayed. Any idea? Any help is much appreciated, thanks. -- View this message in context: http://www.nabble.com/Cannot-retrieve-%24.post%28-%29-response-tf2861724.html#a7996134 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Cannot retrieve $.post( ) response
Jörn, The $([EMAIL PROTECTED], xml); returned an object, but $([EMAIL PROTECTED], xml).val(); returned 'null' value... When I put above line in HTMLTestPage.htm it worked. It seems that $( does not see an 'xml' variable content. Jörn Zaefferer wrote: Sasha Oros schrieb: Hi, I'm trying to use an ajax post request and not sure why is not working. Code in a button: $.post( HTMLTestPage.htm, { employeeID: 007, requestType: R }, function(xml){ alert( xml ); alert( BankName = + $(#BankName, xml).val() ); } ); The 'HTMLTestPage.html' is an html page (not xml). When I click on the button the first alert returns the whole page and I can see the source code, id=BankName and value for the field, but the second alert returns an empty string. I tried using the text() and html() function, but the outcome was the same. By the way, when I created a test button on the 'HTMLTestPage.html' with 'alert( $(#BankName ).val()' it worked and I got the value displayed. HTML or XML returned by $.post or the other AJAX methods do not provide a getElementById selector. You need to use other selectors or use $([EMAIL PROTECTED], xml). -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Cannot-retrieve-%24.post%28-%29-response-tf2861724.html#a7996894 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Cannot retrieve $.post( ) response - Works
Right, my return page was html vs xml. Once, I fixed it your selectors worked great, thanks! Klaus Hartl wrote: Sasha Oros schrieb: Jörn, The $([EMAIL PROTECTED], xml); returned an object, but $([EMAIL PROTECTED], xml).val(); returned 'null' value... When I put above line in HTMLTestPage.htm it worked. It seems that $( does not see an 'xml' variable content. I am now wondering, how can a html page return xml? In other words: Is the response actually xml? -- klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Cannot-retrieve-%24.post%28-%29-response-tf2861724.html#a7997553 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/