Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Seeking input for an idea

13 views
Skip to first unread message

justaguy

unread,
Dec 6, 2016, 3:10:47 PM12/6/16
to

I have an HTML page that has a considerable number of elements (at least 50) and is divided into sections, which means each section has about a doze or so elements. In the meantime, all these elements may not covered every business aspects as we wish, hence, there's a need to allow insertion of a text node at any location of the page. Here's a thought on such a function process / flow.

(1) Have the function button floats at the top right corner
When cursor move down to the middle of the page, it automatically floats to the mid right of the page. When the cursor is close to the bottom of the page it floats to the bottom of the page.

(2) This function button is draggable
Once dragged to a certain position of the page, upon right click, insert a new text node there.

(3) The new text node's position is inferred from its sibling

Doable?

Thanks.

Luuk

unread,
Dec 6, 2016, 3:21:11 PM12/6/16
to
You say that it's divided into sections.

So, someone must havte had some ideas on how this sections exist.
What makes some fields part of the first section, and other fields part
of the secons section, .....

But they did not think long enough, because of you statement:
"there's a need to allow insertion of a text node at any location of the
page"

I would create HTML pages for every section, and create a 'back one
section' and a 'forward one section' button on these pages.
(possibly with validation per section)




justaguy

unread,
Dec 6, 2016, 8:36:16 PM12/6/16
to
Interesting thought on sections, thanks, but not forward or backward.

Evertjan.

unread,
Dec 7, 2016, 5:10:49 AM12/7/16
to
justaguy <lichun...@gmail.com> wrote on 07 Dec 2016 in
comp.lang.javascript:

>> I would create HTML pages for every section, and create a 'back one
>> section' and a 'forward one section' button on these pages.
>> (possibly with validation per section)
>
> Interesting thought on sections, thanks, but not forward or backward.

Don't start with thinking in sections,
but think what comes natural to the viewer/user
and what he or she is accustomed to the html-web world.

Pages with forward, backward and a menu is what comes natural, imho,
to the user and to the html-programmer.

Texts magically appearing and disappearing at the most unexpected places
only pleases the ultra-religious mind.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Thomas 'PointedEars' Lahn

unread,
Dec 7, 2016, 10:14:30 AM12/7/16
to
Stefan Ram wrote:

> justaguy <lichun...@gmail.com> writes:
>> there's a need to allow insertion
>>of a text node at any location of the page.
>
> You want an HTML editor in JavaScript?
>
> You can just license such a beast from
> someone I guess.
>
> If you want to write one yourself, you
> can study the source code of existing
> editors.
>
> A simple, yet not elegant, approach might
> be to convert an element containing the
> position to HTML source code, modify this,
> converted it back to an element and then
> replace the old element with the new one,

document.body.contentEditable = true;

--
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

justaguy

unread,
Dec 7, 2016, 1:52:44 PM12/7/16
to
On Wednesday, December 7, 2016 at 5:10:49 AM UTC-5, Evertjan. wrote:
> justaguy <> wrote on 07 Dec 2016 in
> comp.lang.javascript:
>
> >> I would create HTML pages for every section, and create a 'back one
> >> section' and a 'forward one section' button on these pages.
> >> (possibly with validation per section)
> >
> > Interesting thought on sections, thanks, but not forward or backward.
>
> Don't start with thinking in sections,
> but think what comes natural to the viewer/user
> and what he or she is accustomed to the html-web world.
>
> Pages with forward, backward and a menu is what comes natural, imho,
> to the user and to the html-programmer.
>
> Texts magically appearing and disappearing at the most unexpected places
> only pleases the ultra-religious mind.
>

Thanks for your input. The HTML page in question is in essence an HTML FORM of many elements and because of its complexity, the "sections" help with clarity. It's for certain users in the real estate industry, who understand all its elements.

And since nothing is cut in the stone, the need to accommodate additional elements when the user wants arises. I've solved the problem and am waiting for my client's feedback.

justaguy

unread,
Dec 7, 2016, 1:54:25 PM12/7/16
to
On Wednesday, December 7, 2016 at 10:14:30 AM UTC-5, Thomas 'PointedEars' Lahn wrote:
> Stefan Ram wrote:
>
> > justaguy <> writes:
> >> there's a need to allow insertion
> >>of a text node at any location of the page.
> >
> > You want an HTML editor in JavaScript?
> >
> > You can just license such a beast from
> > someone I guess.
> >
> > If you want to write one yourself, you
> > can study the source code of existing
> > editors.
> >
> > A simple, yet not elegant, approach might
> > be to convert an element containing the
> > position to HTML source code, modify this,
> > converted it back to an element and then
> > replace the old element with the new one,
>
> document.body.contentEditable = true;
>

I've created a text editor myself. In this case I don't need one. Interesting technique tho.


justaguy

unread,
Dec 7, 2016, 2:06:08 PM12/7/16
to
On Wednesday, December 7, 2016 at 10:14:30 AM UTC-5, Thomas 'PointedEars' Lahn wrote:
> Stefan Ram wrote:
>
> > justaguy <> writes:
> >> there's a need to allow insertion
> >>of a text node at any location of the page.
> >
> > You want an HTML editor in JavaScript?
> >
> > You can just license such a beast from
> > someone I guess.
> >
> > If you want to write one yourself, you
> > can study the source code of existing
> > editors.
> >
> > A simple, yet not elegant, approach might
> > be to convert an element containing the
> > position to HTML source code, modify this,
> > converted it back to an element and then
> > replace the old element with the new one,
>
> document.body.contentEditable = true;
>

Interesting concept. Chrome version 54 is able to let a user to remove any text on the page but not FORM elements like INPUT box or I don't know how to at the quick glance; with Firefox verison 50, it considers an element as an object, easier to remove. Good to know, thanks.

0 new messages