> That won't work. Try this test:
>
> alert( "" + null ); // "null" - but we wanted ""
>
alert vs .val() are two different things case in point:
http://jsbin.com/ahivu/edit
there is no "null" put in that text box
I don't recommend patching jQuery to make it work the way you want. If you
do that, then you'll have to re-patch it every time you upgrade. Also if you
find a plugin you want to use, it may not work because it isn't compatible
with your custom version of jQuery.
Instead, bite the bullet and modify
That won't work. Try this test:
alert( "" + null ); // "null" - but we wanted ""
This would work:
$('#verMailDate').attr( "value",data.verMailDate == null ? "" :
data.verMailDate );
Or if it's OK to treat 0 the same as null, this simpler code would work:
$('#verMailDate').attr( "value",data.v
Because there are lots of place to revise and jquery1.2.1 has no such
problem, which part in jquery should be revised?Thanks.
On Fri, Sep 11, 2009 at 12:32 AM, MorningZ wrote:
>
> Easy fix
>
> $('#verMailDate').attr("value",data.verMailDate);
>
> to
>
> $('#verMailDate').attr("value","" + dat
I have lots of places to revise and jquery1.2.1 has no such
problem,so i want to revise jquery1.3.2, which part should i revise?
thanks.
On 9/11/09, Junhua Gao wrote:
> Thanks!!
>
> On Fri, Sep 11, 2009 at 12:32 AM, MorningZ wrote:
>
>>
>> Easy fix
>>
>> $('#verMailDate').attr("value",data.
Thanks!!
On Fri, Sep 11, 2009 at 12:32 AM, MorningZ wrote:
>
> Easy fix
>
> $('#verMailDate').attr("value",data.verMailDate);
>
> to
>
> $('#verMailDate').attr("value","" + data.verMailDate);
>
>
>
> On Sep 10, 12:17 pm, Junhua Gao wrote:
> > $.getJSON('/VersionQueryJsonAction',{verID:verid},f
Easy fix
$('#verMailDate').attr("value",data.verMailDate);
to
$('#verMailDate').attr("value","" + data.verMailDate);
On Sep 10, 12:17 pm, Junhua Gao wrote:
> $.getJSON('/VersionQueryJsonAction',{verID:verid},function(data){
> $('#verMailDate').attr("value",data.verMailDate);
> $
7 matches
Mail list logo