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


Groups > alt.computer > #10657

Re: javascript help, please

From Paul <nospam@needed.invalid>
Newsgroups alt.computer
Subject Re: javascript help, please
Date 2018-01-10 22:44 -0500
Organization A noiseless patient Spider
Message-ID <p36mj8$nft$1@dont-email.me> (permalink)
References (2 earlier) <ElT2C.170585$iX.1455@fx39.iad> <p2h3vh$u2p$1@dont-email.me> <zji5C.226670$qV5.119545@fx37.iad> <p34jph$mq3$1@dont-email.me> <5fw5C.320086$iX.50068@fx39.iad>

Show all headers | View raw


Robert Baer wrote:

>   OK; tried your program and modified it to be as close as possible to 
> my non-functional program and it still works; try attached.
> 
>   The only good thing is that i have _something_ working.....
>   Guess i will have to radically pare down my program even more to find 
> WTH is happening to kill the data transfer.
> 
>   Thanks,
>   R. Baer

Tools : Web Development : Error Console  <=== is your friend

I just tried it.

Now, I've been fiddling with this for at least an hour,
and couldn't get anything to change. Then, suddenly...

******************************************************
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>

<body>
  <p id="xy">This is stupid.</p>
  <p id="demo">This sentence does NOT get replaced like in W3C demo AND document.write() fails.</p>
  <script>
     var test1 = document.getElementById('demo');
     test1.innerHTML;
     document.write(3+4,"<br><br>");
  </script>
Reference: https://www.w3schools.com/js/tryit.asp?filename=tryjs_output_dom
</body>
</html>
******************************************************

The declaration in the head, is solely to stop an error from
showing in the Error Console. It has nothing to do with the function
of your script.

I didn't think making a variable called "test1" would help,
but figured what the hell - maybe it doesn't reference an element
from a returned function result or something.

Now, just putting innerHTML like that, with the semicolon, I
understood that to assign "null" or nothing to it.

And then suddenly the number "7" starts appearing on my screen.
So I tidied it up so it would look pretty for a demo, by putting
a couple blank lines after it.

Notice that "demo" is still not getting overwritten. But content
is being added after it, for some reason.

Anyway, this is the first positive result I've had, after trying
stuff.

And the error console helps... a little bit.

    Paul

Back to alt.computer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: javascript help, please Paul <nospam@needed.invalid> - 2018-01-02 04:26 -0500
  Re: javascript help, please Robert Baer <robertbaer@localnet.com> - 2018-01-02 13:56 -0800
  Re: javascript help, please Paul <nospam@needed.invalid> - 2018-01-02 18:18 -0500
    Re: javascript help, please Robert Baer <robertbaer@localnet.com> - 2018-01-07 16:24 -0800
    Re: javascript help, please Robert Baer <robertbaer@localnet.com> - 2018-01-09 22:23 -0800
      Re: javascript help, please Paul <nospam@needed.invalid> - 2018-01-10 03:44 -0500
        Re: javascript help, please Paul <nospam@needed.invalid> - 2018-01-10 22:44 -0500
          Re: javascript help, please Paul <nospam@needed.invalid> - 2018-01-12 02:49 -0500
            Re: javascript help, please Robert Baer <robertbaer@localnet.com> - 2018-01-12 21:10 -0800
          Re: javascript help, please Paul <nospam@needed.invalid> - 2018-01-12 03:00 -0500
            Re: javascript help, please Robert Baer <robertbaer@localnet.com> - 2018-01-12 21:16 -0800
          Re: javascript help, please Paul <nospam@needed.invalid> - 2018-01-12 04:29 -0500
            Re: javascript help, please Robert Baer <robertbaer@localnet.com> - 2018-01-12 21:39 -0800

csiph-web