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


Groups > comp.lang.javascript > #28877 > unrolled thread

Having trouble reading a table input cell.

Started bydon lancaster <don@tinaja.com>
First post2015-11-11 12:04 -0700
Last post2015-11-12 22:20 +0000
Articles 5 — 5 participants

Back to article view | Back to comp.lang.javascript


Contents

  Having trouble reading a table input cell. don lancaster <don@tinaja.com> - 2015-11-11 12:04 -0700
    Re: Having trouble reading a table input cell. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-11-11 21:35 +0100
    Re: Having trouble reading a table input cell. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-11-12 20:14 +0100
    Re: Having trouble reading a table input cell. Danny <dann90038@gmail.com> - 2015-11-12 12:51 -0800
    Re: Having trouble reading a table input cell. Dr J R Stockton <reply1500@merlyn.demon.co.uk.invalid> - 2015-11-12 22:20 +0000

#28877 — Having trouble reading a table input cell.

Fromdon lancaster <don@tinaja.com>
Date2015-11-11 12:04 -0700
SubjectHaving trouble reading a table input cell.
Message-ID<dahhpmF7iu7U1@mid.individual.net>
as in

   var q1 = document.getElementById("fp00").value ;

this returns a "can't read a null" error.

Code is similar to the "Target Power" part of
http://www.tinaja.com/demo28a.shtml
-- 
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com

[toc] | [next] | [standalone]


#28878

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2015-11-11 21:35 +0100
Message-ID<XnsA54FDB9362400eejj99@194.109.6.166>
In reply to#28877
don lancaster <don@tinaja.com> wrote on 11 Nov 2015 in comp.lang.javascript:

> as in
> 
>    var q1 = document.getElementById("fp00").value ;

What is a "table input cell?

Show us the single line of code, please.
 
> this returns a "can't read a null" error.

What is that '"can't read a null" error.'?

<input> value never returns a null, methinks,
and by what could a null not be "read".

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

[toc] | [prev] | [next] | [standalone]


#28879

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2015-11-12 20:14 +0100
Message-ID<2262035.aXCTfQouTD@PointedEars.de>
In reply to#28877
don lancaster wrote:

> 
> as in

The message body should contain the complete problem description.

>    var q1 = document.getElementById("fp00").value ;
> 
> this returns a "can't read a null" error.

The error message is probably “null has no properties” instead, indicating 
that there is no element with ID “fp00” in that document.

It is also important in which environments [here: browser(s)] you have 
tested the code.

> Code is similar to the "Target Power" part of
> http://www.tinaja.com/demo28a.shtml

In order to help you, we also need the *actual* code if it is short, a 
reference to it (by URI) if is longer.  But you should debug yourself first.

Please read the FAQ for recommendations on how to post here, and for 
references to and about browser developer tools.

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

[toc] | [prev] | [next] | [standalone]


#28880

FromDanny <dann90038@gmail.com>
Date2015-11-12 12:51 -0800
Message-ID<15d38000-dfc0-4243-9b99-c9efefd267f4@googlegroups.com>
In reply to#28877
to don lancaster

got url? or markup?  if what you have is, along the lines of

<td>  <input id="fp00" ..> </td>

then it should work :)

[toc] | [prev] | [next] | [standalone]


#28881

FromDr J R Stockton <reply1500@merlyn.demon.co.uk.invalid>
Date2015-11-12 22:20 +0000
Message-ID<sToTvHGuCRRWFw$w@invalid.uk.co.demon.merlyn.invalid>
In reply to#28877
In comp.lang.javascript message <dahhpmF7iu7U1@mid.individual.net>, Wed,
11 Nov 2015 12:04:19, don lancaster <don@tinaja.com> posted:

Please explain the question fully in the body of the message; do not
assume that all newsreaders display the Subject like yours does.

>as in
>
>  var q1 = document.getElementById("fp00").value ;
>
>this returns a "can't read a null" error.

That suggests that no element is got.  The obvious test is
  alert( document.getElementById("fp00") )

You should show the HTML (or script) that generates your "table input
cell"; we could then see whether you need .value or something else.
We could also see exactly what has the requisite ID - maybe a table
cell, maybe some other element inside the cell.

Once you have an ID that matches "fp00",

   alert( document.getElementById("fp00").innerHTML )

should be informative.


-- 
 (c) John Stockton, Surrey, UK.  ¬@merlyn.demon.co.uk   Turnpike v6.05   MIME.
 Merlyn Web Site <                       > - FAQish topics, acronyms, & links.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web