[jQuery] Corrupt ajax requests?
Suddenly Ajax no longer seems to perform well formatted POST requests. Consider the following call: jQuery.ajax({ type:'POST', dataType:'text', url:'ajax.php', data:({ testParamOne:1, testParamTwo:2 }) }); And ajax.php: ?php echo var_export($_POST,1); When executed, this is displayed in the Post tab of the request in Firebug: testParamOne=1testParamTwo=2 and the Response tab: array ( ) It appears that whatever jQuery is sending, it certainly isn't a valid POST request! There is no reference of any of the two parameters in the URL either. What is wrong?
[jQuery] strange behavior when using jQuery fadeOut function on element with floated element and absolutely positioned element
I am having some strange behavior with the fadeOut function. I asked about it on StackOverflow. If you want, you can see the discussion at http://stackoverflow.com/questions/735292/strange-behavior-when-using-jquery-fadeout-function-on-element-with-floated-eleme . Someone on there mentioned that this is a bug with jQuery 1.3.2 and it is not present in 1.3. I have pasted the question below in case anyone is unable to view the discussion: I am trying to use jQuery to fade out a div, using the fadeOut function. In most cases, it seems to work fine, but in certain cases, not all of the content fades out. If I have an absolutely positioned element and a floated element within the div, the fadeOut function doesn't work. If I only have an absolutely positioned element, it doesn't work. But if I have an absolutely positioned element and an unstyled element, it works. This may sound hard to explain, but you can try it yourself using this test code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; htmlhead titlejQuery fadeOut test/title meta http-equiv=Content-Type content=text/html; charset=UTF-8 script type=text/javascript src=jquery-1.3.2.min.js/script /head body div id=testBox1 style=position: relative divtest/div p style=position: absolute; left: 0; top: 0This text should fade out./p /div brbr button type=button onclick=$('#testBox1').fadeOut()fade out/ button !-- works -- hr div id=testBox2 style=position: relative div style=float: lefttest/div p style=position: absolute; left: 0; top: 0This text should fade out./p /div brbr button type=button onclick=$('#testBox2').fadeOut()fade out/ button !-- doesn't work -- hr div id=testBox3 style=position: relative p style=position: absolute; left: 0; top: 0This text should fade out./p /div brbr button type=button onclick=$('#testBox3').fadeOut()fade out/ button !-- doesn't work -- /body/html Everything seems to work fine in IE7, but in Firefox and Chrome, I am getting the strange behavior. Can anyone figure out why? Am I doing something wrong, or is it a browser bug or a bug within jQuery? You can see an example you can easily tinker with at http://jsbin.com/obipe . Add /edit at the end of the URL to be able to edit it.
[jQuery] Re: “too much recursion” error in JQuer y 1.3.2
Sorry about this. It is not a bug. I just didn't fully understand the new event bubbling behavior. You can see the solution to this problem in case anyone may find it helpful: http://stackoverflow.com/questions/639862/too-much-recursion-error-in-jquery-1-3-2
[jQuery] “too much recursion” error in JQuery 1. 3.2
I am trying to make a form with some dynamic behavior. Specifically, I have my inputs in divs, and I would like to make it so when the user clicks anywhere in the div, the input is selected. I was using JQuery 1.2.6 and everything worked fine. However, I upgraded to JQuery 1.3.2 and I am getting some strange behavior. When I click on any of the inputs, I get a delay before it is selected. My Firefox error console gives me several too much recursion errors, from within the JQuery library. I tried the page in Internet Explorer 7 and got an error saying Object doesn't support this property or method. Am I doing something wrong, or is this a bug in JQuery? Does anyone know a way to fix this behavior, without going back to the old version? I am using Firefox 3.0.7 in case that matters. Here is a simple example I made to illustrate the problem: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http:// www.w3.org/TR/html4/loose.dtd htmlhead meta http-equiv=Content-Type content=text/html; charset=UTF-8 titlequiz test/title script type=text/javascript src=jquery-1.3.2.min.js/script /head body div class='question'Favorite soda? divinput type='radio' name='q' value='A' id='a'label for='a'Coke/label/div divinput type='radio' name='q' value='B' id='b'label for='b'Pepsi/label/div /div script type=text/javascript $(function() { $(.question div).click(function() { $(this).children(input).click(); }); }); /script /body/html
[jQuery] Re: serializeArray problem with IE7
Hi, found the solution for my problem, surprise, surprise: form html was invalid meaning that closing tag of form was form :) FF was able to parse DOM, IE not. Mike, havent tested but I think that $(#editDiv form).serializeArray() works also. Cheers Olli On Dec 18, 5:30 pm, Mike Alsup [EMAIL PROTECTED] wrote: Just out of curiosity, does this work? var data = $(#editDiv form).serializeArray(); Mike On Dec 18, 2007 7:55 AM, elias [EMAIL PROTECTED] wrote: Hi, I have a following problem, FF2 works fine, IE not: I have a form that is written dynamically on page, by dynamically I mean that form html comes from ajax response like this: function getForm() { $.ajax({ url: actionurl, data: data, success: function(html){ $(#editDiv).empty(); $(#editDiv).html(html); }, type:POST, cache:false }); return false; } and then another function that serializes the form input fields and sends data to server when #editForm is submitted: function paSave() { var data = $(#editForm).serializeArray(); $.ajax({ url: actionurl, data: data, success: function(resp){ .. }, error: function(XMLHttpRequest, textStatus, errorThrown) { }, type:POST, dataType: json, cache:false }); return false; } And it seems that with IE7 $(#editForm).serializeArray() returns null, FF returns nicely data object holding form values. Have someone else had this problem before, any help would be appreciated!
[jQuery] serializeArray problem with IE7
Hi, I have a following problem, FF2 works fine, IE not: I have a form that is written dynamically on page, by dynamically I mean that form html comes from ajax response like this: function getForm() { $.ajax({ url: actionurl, data: data, success: function(html){ $(#editDiv).empty(); $(#editDiv).html(html); }, type:POST, cache:false }); return false; } and then another function that serializes the form input fields and sends data to server when #editForm is submitted: function paSave() { var data = $(#editForm).serializeArray(); $.ajax({ url: actionurl, data: data, success: function(resp){ .. }, error: function(XMLHttpRequest, textStatus, errorThrown) { }, type:POST, dataType: json, cache:false }); return false; } And it seems that with IE7 $(#editForm).serializeArray() returns null, FF returns nicely data object holding form values. Have someone else had this problem before, any help would be appreciated!