Hey suppose I have code like:

<td id="something">I want to put stuff in here</td>

How would I be able to put the value of a JavaScript array into the part where I want to put stuff. Say the value of the array at a position is hello, I would output hello.

Recommended Answers

All 2 Replies

Using a form would be one approach. Are you trying to avoid the use of forms?

Alternately, you could try innerHTML. Put a div or span where results are to be inserted and then write the Javascript code such that it outputs the appropriate HTML.

Well say I have an array that has a value of "Text" at position 0. How would I set the array at position 0 to display in my table where I have the element x.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.