Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #32712 > unrolled thread

Issue with assigning the newly inputted value of an INPUT box to SPAN

Started byjustaguy <lichunshen84@gmail.com>
First post2017-03-10 08:24 -0800
Last post2017-03-16 17:58 -0700
Articles 4 — 2 participants

Back to article view | Back to comp.lang.javascript


Contents

  Issue with assigning the newly inputted value of an INPUT box to SPAN justaguy <lichunshen84@gmail.com> - 2017-03-10 08:24 -0800
    Re: Issue with assigning the newly inputted value of an INPUT box to SPAN justaguy <lichunshen84@gmail.com> - 2017-03-10 11:36 -0800
      Re: Issue with assigning the newly inputted value of an INPUT box to SPAN Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-03-10 19:52 +0000
        Re: Issue with assigning the newly inputted value of an INPUT box to SPAN justaguy <lichunshen84@gmail.com> - 2017-03-16 17:58 -0700

#32712 — Issue with assigning the newly inputted value of an INPUT box to SPAN

Fromjustaguy <lichunshen84@gmail.com>
Date2017-03-10 08:24 -0800
SubjectIssue with assigning the newly inputted value of an INPUT box to SPAN
Message-ID<9296f5aa-bfd0-48a9-8d31-c3e9355cdf4a@googlegroups.com>
Issue with assigning the newly inputted value of an INPUT box to SPAN.

<input type="text" id="fy" name="fy" size=8 onblur="document.getElementById('fyNew').innerHTML='document.getElementById(\'fy\').value';">

or

<input type="text" id="fy' name="fy" size=8 onblur="+document.getElementById('fyNew').innerHTML='document.getElementById(\'fy\').value+';">

<span id="fyNew"></span>


Thanks.

[toc] | [next] | [standalone]


#32713

Fromjustaguy <lichunshen84@gmail.com>
Date2017-03-10 11:36 -0800
Message-ID<4ad424a0-1461-4739-9be3-0cc8be16dce9@googlegroups.com>
In reply to#32712
On Friday, March 10, 2017 at 11:25:01 AM UTC-5, justaguy wrote:
> Issue with assigning the newly inputted value of an INPUT box to SPAN.
> 
> <input type="text" id="fy" name="fy" size=8 onblur="document.getElementById('fyNew').innerHTML='document.getElementById(\'fy\').value';">
> 
> or
> 
> <input type="text" id="fy' name="fy" size=8 onblur="+document.getElementById('fyNew').innerHTML='document.getElementById(\'fy\').value+';">
> 
> <span id="fyNew"></span>
> 
> 
> Thanks.

Never mind. I had a typo for the initial field id.  And it should be:
<input type="text" id="fy" name="fy" size=8 onblur="document.getElementById('fyNew').innerHTML=document.getElementById('fy').value;">

[toc] | [prev] | [next] | [standalone]


#32714

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2017-03-10 19:52 +0000
Message-ID<87tw70ykny.fsf@bsb.me.uk>
In reply to#32713
justaguy <lichunshen84@gmail.com> writes:
<snip>
> Never mind. I had a typo for the initial field id.  And it should be:
> <input type="text" id="fy" name="fy" size=8 onblur="document.getElementById('fyNew').innerHTML=document.getElementById('fy').value;">

Or, slightly simpler,

<input type=text name=fy size=8
       onblur="document.getElementById('fyNew').innerHTML=this.value">

though you usually get more maintainable source if you avoid using these
"onxxx" attributes.

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#32784

Fromjustaguy <lichunshen84@gmail.com>
Date2017-03-16 17:58 -0700
Message-ID<3df589d5-f9bb-4296-ac48-c9e29a0b3ade@googlegroups.com>
In reply to#32714
On Friday, March 10, 2017 at 2:52:08 PM UTC-5, Ben Bacarisse wrote:
> justaguy  writes:
> <snip>
> > Never mind. I had a typo for the initial field id.  And it should be:
> > <input type="text" id="fy" name="fy" size=8 onblur="document.getElementById('fyNew').innerHTML=document.getElementById('fy').value;">
> 
> Or, slightly simpler,
> 
> <input type=text name=fy size=8
>        onblur="document.getElementById('fyNew').innerHTML=this.value">
> 
> though you usually get more maintainable source if you avoid using these
> "onxxx" attributes.
> 
> -- 
> Ben.

Yeah, good to know, thanks.  Sorry for late response, haven't been on this NG for a while.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web