S
Swifty
Given a string of words such as "The quick brown fox jumps over the
lazy dog", how easy would it be to generate a string containing the
initial letters of the words, in lower case, e.g. 'tqbfjotld'
As it happens, the string will come from the content (value) of one
<INPUT TYPE=TEXT> control, and the output will replace the content
(value) of another INPUT control on a user action, such as a mouse
click.
I don't have a page to demonstrate how far I've already got, as the
idea only just occurred to me. I can manage the HTML, and the
JavaScript to get the value of the first INPUT control, and then set
the content of the second INPUT control.
What I'm looking for is the JavaScript equivalent of my initials()
function that I have in my REXX subroutines library:
Inits = ''
Do I = 1 to words(string)
Inits = Inits || left(word(string,I),1)
End
lazy dog", how easy would it be to generate a string containing the
initial letters of the words, in lower case, e.g. 'tqbfjotld'
As it happens, the string will come from the content (value) of one
<INPUT TYPE=TEXT> control, and the output will replace the content
(value) of another INPUT control on a user action, such as a mouse
click.
I don't have a page to demonstrate how far I've already got, as the
idea only just occurred to me. I can manage the HTML, and the
JavaScript to get the value of the first INPUT control, and then set
the content of the second INPUT control.
What I'm looking for is the JavaScript equivalent of my initials()
function that I have in my REXX subroutines library:
Inits = ''
Do I = 1 to words(string)
Inits = Inits || left(word(string,I),1)
End