[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-17 Thread vdhant
Thanks ill give this a go... On Jun 17, 5:31 pm, Daniel Friesen nadir.seen.f...@gmail.com wrote: (function(oldVal) {     $.fn.val = function(value) {        if ( arguments.length )           return oldVal.call( this, value === undefined || value === null ? : value );        else          

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-17 Thread John Resig
Daniel - I'm not familiar with this issue - is there a ticket related to it? --John On Tue, Jun 16, 2009 at 11:11 PM, Daniel Friesennadir.seen.f...@gmail.com wrote: Hmmm? Clarifying, has $(el).css('width', undefined).someOtherFnMethod(); been fixed? ~Daniel Friesen (Dantman,

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-17 Thread Daniel Friesen
http://dev.jquery.com/ticket/4388 Though I thought there was a bigger master bug for this. It's because of how for a long time jQuery has checked for undefined arguments rather than checked for the length of the arguments. As a result: .css('width', undefined); would be interpreted as a css

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-17 Thread vdhant
This fix worked great. So how do we go about raising a bug for this so it gets fixed in the next release? As I mentioned I have more than a little trouble trying to raise it myself. Cheers Anthony On Jun 17, 5:31 pm, Daniel Friesen nadir.seen.f...@gmail.com wrote: (function(oldVal) {    

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-17 Thread John Resig
Anthony - I've noted the ticket that you filed in my personal todo list. It doesn't seem too hard to fix so hopefully I'll be able to tackle it soon. --John On Wed, Jun 17, 2009 at 5:54 PM, vdhantvdh@gmail.com wrote: This fix worked great. So how do we go about raising a bug for this

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-17 Thread vdhant
Sounds good to me. Thanks everyone for the help. Cheers Anthony On Jun 18, 9:15 am, John Resig jere...@gmail.com wrote: Anthony - I've noted the ticket that you filed in my personal todo list. It doesn't seem too hard to fix so hopefully I'll be able to tackle it soon. --John On Wed,

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-16 Thread samer
You can try passing an empty string $('#Test').val(''); I don't know whyt it's behaving that way though On Jun 16, 8:01 pm, vdhant vdh@gmail.com wrote: Hi guys I have the following case: input type=text id=Test / script $('#Test').val(null); /script See working example

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-16 Thread Daniel Friesen
var item = { ..., 'DataItem10of20' : null, ... }; $('#TextBox10of20').val(item.DataItem10of20||''); It's always a good idea to either use a ||'' or cast your data to a string or other proper datatype when using jQuery, a large number of the methods will have somewhat undesirable results if you

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-16 Thread Rick Waldron
Perhaps a patch for val()? Test if the value being passed is a string and equal to null, set to to ''? Rick On Tue, Jun 16, 2009 at 8:20 PM, samer samerzia...@gmail.com wrote: You can try passing an empty string $('#Test').val(''); I don't know whyt it's behaving that way though On Jun 16,

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-16 Thread vdhant
How would I go about the patch you mention? Cheers On Jun 17, 10:56 am, Rick Waldron waldron.r...@gmail.com wrote: Perhaps a patch for val()? Test if the value being passed is a string and equal to null, set to to ''? Rick On Tue, Jun 16, 2009 at 8:20 PM, samer samerzia...@gmail.com wrote:

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-16 Thread John Resig
It's always a good idea to either use a ||'' or cast your data to a string or other proper datatype when using jQuery, a large number of the methods will have somewhat undesirable results if you try using null or undefined, it's a known issue. Oh, I wouldn't go that far. We've patched any

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-16 Thread Daniel Friesen
Hmmm? Clarifying, has $(el).css('width', undefined).someOtherFnMethod(); been fixed? ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] John Resig wrote: It's always a good idea to either use a ||'' or cast your data to a string or other proper datatype when using

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-16 Thread vdhant
@John I am having trouble raising the bug. I have registered and loged in but when ever I try and create a bug it comes up and says: TICKET_CREATE privileges are required to perform this operation Note: You must register and login in order to submit, edit, or comment on a ticket. Is

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-16 Thread vdhant
Hey guys In the meantime how could I go about creating my own patch that fixes this issue??? Cheers Anthony On Jun 17, 1:11 pm, Daniel Friesen nadir.seen.f...@gmail.com wrote: Hmmm? Clarifying, has $(el).css('width', undefined).someOtherFnMethod(); been fixed? ~Daniel Friesen (Dantman,

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-16 Thread David Zhou
Checkout the jQuery svn repo, make your changes and generate a diff. -- dz On Tue, Jun 16, 2009 at 11:34 PM, vdhant vdh@gmail.com wrote: Hey guys In the meantime how could I go about creating my own patch that fixes this issue??? Cheers Anthony On Jun 17, 1:11 pm, Daniel Friesen