Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #14478 > unrolled thread
| Started by | micky <NONONOmisc07@bigfoot.com> |
|---|---|
| First post | 2012-06-13 06:37 -0400 |
| Last post | 2012-06-15 04:45 -0400 |
| Articles | 4 on this page of 24 — 7 participants |
Back to article view | Back to comp.lang.javascript
I copied from a book and still got an error. micky <NONONOmisc07@bigfoot.com> - 2012-06-13 06:37 -0400
Re: I copied from a book and still got an error. micky <NONONOmisc07@bigfoot.com> - 2012-06-13 06:49 -0400
Re: I copied from a book and still got an error. micky <NONONOmisc07@bigfoot.com> - 2012-06-13 07:03 -0400
Re: I copied from a book and still got an error. Stefan Weiss <krewecherl@gmail.com> - 2012-06-13 13:27 +0200
Re: I copied from a book and still got an error. micky <NONONOmisc07@bigfoot.com> - 2012-06-15 00:01 -0400
Re: I copied from a book and still got an error. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-06-15 06:11 +0000
Re: I copied from a book and still got an error. micky <NONONOmisc07@bigfoot.com> - 2012-06-15 02:24 -0400
Re: I copied from a book and still got an error. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-06-15 06:38 +0000
Re: I copied from a book and still got an error. micky <NONONOmisc07@bigfoot.com> - 2012-06-15 05:01 -0400
Re: I copied from a book and still got an error. Dr J R Stockton <reply1224@merlyn.demon.co.uk.not.invalid> - 2012-06-16 21:55 +0100
Re: I copied from a book and still got an error. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-06-17 07:50 +0000
Re: I copied from a book and still got an error. Dr J R Stockton <reply1225@merlyn.demon.co.uk.not.invalid> - 2012-06-19 20:37 +0100
Re: I copied from a book and still got an error. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-06-20 15:10 +0000
Re: I copied from a book and still got an error. Stefan Weiss <krewecherl@gmail.com> - 2012-06-15 15:53 +0200
Re: I copied from a book and still got an error. micky <NONONOmisc07@bigfoot.com> - 2012-06-15 18:07 -0400
Re: I copied from a book and still got an error. micky <NONONOmisc07@bigfoot.com> - 2012-06-19 21:22 -0400
Re: I copied from a book and still got an error. Martin Honnen <mahotrash@yahoo.de> - 2012-06-13 13:04 +0200
Re: I copied from a book and still got an error. micky <NONONOmisc07@bigfoot.com> - 2012-06-15 00:01 -0400
Re: I copied from a book and still got an error. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-06-13 14:21 +0300
Re: I copied from a book and still got an error. micky <NONONOmisc07@bigfoot.com> - 2012-06-15 00:01 -0400
Re: I copied from a book and still got an error. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-06-15 08:05 +0300
Re: I copied from a book and still got an error. micky <NONONOmisc07@bigfoot.com> - 2012-06-15 02:37 -0400
Re: I copied from a book and still got an error. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-06-15 09:58 +0300
Re: I copied from a book and still got an error. micky <NONONOmisc07@bigfoot.com> - 2012-06-15 04:45 -0400
Page 2 of 2 — ← Prev page 1 [2]
| From | "Jukka K. Korpela" <jkorpela@cs.tut.fi> |
|---|---|
| Date | 2012-06-15 08:05 +0300 |
| Message-ID | <jrefr8$v8m$1@dont-email.me> |
| In reply to | #14507 |
2012-06-15 7:01, micky wrote: >> The <form> markup really just confuses, as does the use of an input >> element rather than an element with normal text content. > > I thought I needed the input element, in order to make a box in which > to enter text. That is correct in classic HTML: only form fields (<input>, <textarea>) accept text as user input. But for the purpose of demonstrating how JavaScript lets you associate events with clicking (which is what the example seems to be about), such input is not relevant. And in the example, the <input> element has type="button", which makes it a button, not a text input field. In modern HTML, you can make text input from user possible also by using the contenteditable attribute on an element. This way, much richer user input tools can be implemented, using JavaScript. -- Yucca, http://www.cs.tut.fi/~jkorpela/
[toc] | [prev] | [next] | [standalone]
| From | micky <NONONOmisc07@bigfoot.com> |
|---|---|
| Date | 2012-06-15 02:37 -0400 |
| Message-ID | <f9llt799i0ilop17imik8dmvg94q8cun03@4ax.com> |
| In reply to | #14509 |
On Fri, 15 Jun 2012 08:05:47 +0300, "Jukka K. Korpela" <jkorpela@cs.tut.fi> wrote: >2012-06-15 7:01, micky wrote: > >>> The <form> markup really just confuses, as does the use of an input >>> element rather than an element with normal text content. >> >> I thought I needed the input element, in order to make a box in which >> to enter text. > >That is correct in classic HTML: only form fields (<input>, <textarea>) >accept text as user input. But for the purpose of demonstrating how >JavaScript lets you associate events with clicking (which is what the >example seems to be about), such input is not relevant. What I meant by my two lines above your four lines, was that my end-goal is not just to associate an event with clicking, but also to accept input text into a box, and do something with the text when the user clicks. So I was trying to get the input element to work. And this was sample code I found that used it. > And in the >example, the <input> element has type="button", which makes it a button, >not a text input field. Later I was going to change to type="submit" or some other choice I can't remember right now. . I had already tried both of themt and I couldn't make them work, so I thought I would retreat a bit and try something "guaranteed" to work since I was copying it straight out of book. > >In modern HTML, you can make text input from user possible also by using >the contenteditable attribute on an element. This way, much richer user >input tools can be implemented, using JavaScript. What does "much richer" mean? I only expect users to input alphanumeric text, plus sometimes double quotes, the @ sign, and a few other symbols from the keyboard. Thanks for your help, (And thanks to Martin, Stefan, and Evertjan.)
[toc] | [prev] | [next] | [standalone]
| From | "Jukka K. Korpela" <jkorpela@cs.tut.fi> |
|---|---|
| Date | 2012-06-15 09:58 +0300 |
| Message-ID | <jremfb$smk$1@dont-email.me> |
| In reply to | #14514 |
2012-06-15 9:37, micky wrote: >> In modern HTML, you can make text input from user possible also by using >> the contenteditable attribute on an element. This way, much richer user >> input tools can be implemented, using JavaScript. > > What does "much richer" mean? Basically things like you can do with HTML and CSS. At the simplest level, setting font face, size, italic, color, adding images. > I only expect users to input > alphanumeric text, plus sometimes double quotes, the @ sign, and a few > other symbols from the keyboard. Normal text input field is sufficient then, and more robust (considering older browsers, possibility of having JavaScript turned off, etc.). Depending on the expected input and expectations on the input methods that people use, you might consider adding an optional, JavaScript-driven enhancement: create buttons that can be used to insert characters that might be difficult to type (e.g., accented letters or special symbols). But if you expect people to find the characters on their keyboards, this is unnecessary (and might even be mildly confusing). -- Yucca, http://www.cs.tut.fi/~jkorpela/
[toc] | [prev] | [next] | [standalone]
| From | micky <NONONOmisc07@bigfoot.com> |
|---|---|
| Date | 2012-06-15 04:45 -0400 |
| Message-ID | <ictlt75fa24ionk8hbjlka85gamftfoqud@4ax.com> |
| In reply to | #14516 |
On Fri, 15 Jun 2012 09:58:53 +0300, "Jukka K. Korpela" <jkorpela@cs.tut.fi> wrote: >2012-06-15 9:37, micky wrote: > >>> In modern HTML, you can make text input from user possible also by using >>> the contenteditable attribute on an element. This way, much richer user >>> input tools can be implemented, using JavaScript. >> >> What does "much richer" mean? > >Basically things like you can do with HTML and CSS. At the simplest >level, setting font face, size, italic, color, adding images. I should have thought of those things. Yeah, I don't need them. >> I only expect users to input >> alphanumeric text, plus sometimes double quotes, the @ sign, and a few >> other symbols from the keyboard. > >Normal text input field is sufficient then, and more robust (considering >older browsers, possibility of having JavaScript turned off, etc.). > >Depending on the expected input and expectations on the input methods >that people use, you might consider adding an optional, >JavaScript-driven enhancement: create buttons that can be used to insert >characters that might be difficult to type (e.g., accented letters or >special symbols). But if you expect people to find the characters on >their keyboards, this is unnecessary (and might even be mildly confusing). Maybe so. I wish I had time to work on this even a little each day. Buit I don't so I won't be back for several more days. Thanks.
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.javascript
csiph-web