Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Best way to edit a table in browser

Posted on 2012-03-27
1
Medium Priority
?
158 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

Technology Partners: 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

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

636 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