Thanks for the reply, Ricardo...

After thinking about it, it really doesn’t matter if the HTML is changed.
It'll process fine, as you said.

What I was really trying to avoid was a problem with the newly entered
data being removed if I focused on the field with the cursor again.

I came up with a better solution that deleted the error message I put
into the field, but didn't delete the new typed in code.

Rick



-----Original Message-----
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Ricardo
Sent: Wednesday, September 02, 2009 9:09 PM
To: jQuery (English)
Subject: [jQuery] Re: Is this "quirk" of jQuery still true?


The change in value won't appear in the HTML (in firebug for example),
but the value *will* change and be submitted with the form. That's
standard DOM scripting behaviour. There is no reason to change the
attribute in the HTML unless you want to print it somewhere.

On Sep 2, 5:55 pm, "Rick Faircloth" <r...@whitestonemedia.com> wrote:
> I read that in an article dated October 17, 2008, that it was not possible
> to change the actual
>
> HTML in the DOM of the "value" attribute of a text input using
> $(this).val('myNewValue');
>
> My experiments just now bear this out.
>
> Is this still true?  The writer of the article developed a work-around
using
> a hidden input and
>
> manipulating its value with a rel to the original input.  Is this still
the
> best way?
>
> Thanks for any insights.
>
> Rick
>
>
----------------------------------------------------------------------------
> ---------------------------------------
>
> "Those who hammer their guns into plows will plow for those who do not."
 -
> Thomas Jefferson


Reply via email to