From: Garrett Smith on
On 6/15/2010 2:34 PM, Dr J R Stockton wrote:
> In comp.lang.javascript message<4c1562fb$0$276$14726298(a)news.sunsite.dk
>> , Sun, 13 Jun 2010 23:00:03, FAQ server<javascript(a)dotinternet.be>
> posted:
>
>> FAQ Topic - How do I modify the content of the current
>> page?
>
> You have ignored previous discussion, in which it was pointed out that
> answering the Subject question involves describing two stages :
>
> First, obtain a reference to an appropriate part of the document.
> Secondly, apply the change.
>

The question itself is too vague. Perhaps it should be:

"How to I modify the content of an Element"?

> There are various ways, apart from getElementById, of getting such a
> reference.
>
> There are various ways, apart from writing or rewriting text or HTML, of
> changing the visible content (and it is the content as seen that was
> being asked about). For example, styling display to none or block is
> likely to be better for revealing/concealing sections of fixed material.
>

Styling is not content.

Garrett
From: Andrew Poulos on
On 16/06/2010 8:57 AM, Garrett Smith wrote:
> On 6/15/2010 2:34 PM, Dr J R Stockton wrote:
>> In comp.lang.javascript message<4c1562fb$0$276$14726298(a)news.sunsite.dk
>>> , Sun, 13 Jun 2010 23:00:03, FAQ server<javascript(a)dotinternet.be>
>> posted:
>>
>>> FAQ Topic - How do I modify the content of the current
>>> page?
>>
>> You have ignored previous discussion, in which it was pointed out that
>> answering the Subject question involves describing two stages :
>>
>> First, obtain a reference to an appropriate part of the document.
>> Secondly, apply the change.
>>
>
> The question itself is too vague. Perhaps it should be:
>
> "How to I modify the content of an Element"?
>
>> There are various ways, apart from getElementById, of getting such a
>> reference.
>>
>> There are various ways, apart from writing or rewriting text or HTML, of
>> changing the visible content (and it is the content as seen that was
>> being asked about). For example, styling display to none or block is
>> likely to be better for revealing/concealing sections of fixed material.
>>
>
> Styling is not content.

Wouldn't content be that which is visible to the end user? Styling
itself is not content but it modifies the content of the current page.

Unless "how do I modify the content of the current page" is meant to be
read "how do I replace at least some of the contents of the current page
with other content that is currently not part of the current page".

Andrew Poulos
From: Garrett Smith on
On 6/15/2010 5:13 PM, Andrew Poulos wrote:
> On 16/06/2010 8:57 AM, Garrett Smith wrote:
>> On 6/15/2010 2:34 PM, Dr J R Stockton wrote:
>>> In comp.lang.javascript message<4c1562fb$0$276$14726298(a)news.sunsite.dk
>>>> , Sun, 13 Jun 2010 23:00:03, FAQ server<javascript(a)dotinternet.be>
>>> posted:
>>>
>>>> FAQ Topic - How do I modify the content of the current
>>>> page?
>>>
[...]

>>
>> Styling is not content.
>
> Wouldn't content be that which is visible to the end user? Styling
> itself is not content but it modifies the content of the current page.
>

No, it does not. Hiding and showing an object is not the same as
changing its content.

> Unless "how do I modify the content of the current page" is meant to be
> read "how do I replace at least some of the contents of the current page
> with other content that is currently not part of the current page".
>
Yes, that is a modification of content.

Garrett
From: Andrew Poulos on
On 16/06/2010 10:43 AM, Garrett Smith wrote:
> On 6/15/2010 5:13 PM, Andrew Poulos wrote:
>> On 16/06/2010 8:57 AM, Garrett Smith wrote:
>>> On 6/15/2010 2:34 PM, Dr J R Stockton wrote:
>>>> In comp.lang.javascript message<4c1562fb$0$276$14726298(a)news.sunsite.dk
>>>>> , Sun, 13 Jun 2010 23:00:03, FAQ server<javascript(a)dotinternet.be>
>>>> posted:
>>>>
>>>>> FAQ Topic - How do I modify the content of the current
>>>>> page?
>>>>
> [...]
>
>>>
>>> Styling is not content.
>>
>> Wouldn't content be that which is visible to the end user? Styling
>> itself is not content but it modifies the content of the current page.
>>
>
> No, it does not. Hiding and showing an object is not the same as
> changing its content.

Ok, for you the content is not what's visible. So if there was a button
that changed the style of an element from display:none to display:block
and another button that pulled some data from a server and displayed it
in the page they are not both modifying the content of the current page
even though you couldn't possibly tell without looking at the page source???

Andrew Poulos
From: Garrett Smith on
On 6/15/2010 6:20 PM, Andrew Poulos wrote:
> On 16/06/2010 10:43 AM, Garrett Smith wrote:
>> On 6/15/2010 5:13 PM, Andrew Poulos wrote:
>>> On 16/06/2010 8:57 AM, Garrett Smith wrote:
>>>> On 6/15/2010 2:34 PM, Dr J R Stockton wrote:
>>>>> In comp.lang.javascript
>>>>> message<4c1562fb$0$276$14726298(a)news.sunsite.dk
>>>>>> , Sun, 13 Jun 2010 23:00:03, FAQ server<javascript(a)dotinternet.be>
>>>>> posted:

[...]
> Ok, for you the content is not what's visible. So if there was a button
> that changed the style of an element from display:none to display:block
> and another button that pulled some data from a server and displayed it
> in the page they are not both modifying the content of the current page
> even though you couldn't possibly tell without looking at the page
> source???
>

Right. Not both.

Positioning, clipping, or giving negative z-index are other style
changes that can be used to hide and show content. The style of the
content is not the content.