?
Solved

Best way to edit a table in browser

Posted on 2012-03-27
1
Medium Priority
?
156 Views
Last Modified: 2012-04-18
I'm trying to have an HTML table that someone can click a <td> tag, type, and have whatever they type show up in that tag.

What would be the best way to do this?
Thanks,
-JWW


<table>
<tbody>
      <tr>
            <td>A</td>
            <td class="edit">B</td>
      </tr>
      <tr>
            <td>C</td>
            <td class="edit">C</td>
      </tr>

</tbody>
</table>

Open in new window

0
Comment
Question by:JustinW
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 6

Accepted Solution

by:
bartvd earned 2000 total points
ID: 37773576
<html>
<head>
<script type="text/javascript">
function displaymessage(element)
{
var reply=prompt("Enter a value:","");
element.innerHTML=reply;
}
</script>
</head>

<body>
<table>
<tbody>
      <tr>
            <td onclick="displaymessage(this)">A</td>
            <td onclick="displaymessage(this)">B</td>
      </tr>
      <tr>
            <td onclick="displaymessage(this)">C</td>
            <td onclick="displaymessage(this)">D</td>
      </tr>

</tbody>
</table>
</body>
</html>
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question