Question: How can I add rows to a table with this structure using Javascript?

Basically I want to be able to click a button and have a new row created within the table for each of the columns used below. So for instance, it could be name: new book, quantity:30 etc.

```
<table id="dynamictable">
    <tbody>
        <tr>
            <td class="name">My Favorite book</td>
            <td class="quantity">x&nbsp;20</td>
            <td class="unit_price">£8.99</td>
            <td class="total">£179.80</td>
            <td class="remove">
                <img src="image/cross.png">
            </td>
        </tr>
    </tbody>
</table>

```

Answer: 
On unix like systems (linux, freebsd, etc) os.FindProcess will never return an error. I don't know what happens on Windows. This means you won't know if the PID is correct until you try to use the \*os.Process for something.

You can look at the code [here](http://golang.org/src/pkg/os/exec_unix.go#L59).
After searching for a few hours, the correct answer to know if a process is running on Windows is the following:

```
func CheckProcessLife(pid int){
    cmd,_ := exec.Command("tasklist","/FI", "PID eq " + strconv.Itoa(pid)).Output()
    output := string(cmd[:])
    splitOutp := strings.Split(output, " ")
    if !(splitOutp[1] == "no") {
        time.Sleep(500 * time.Millisecond)
        fmt.Println("Process is running...")
        CheckProcessLife(pid)
    }else{
        fmt.Println("Process is no longer running.")
    }
}

```

You can check if the process is running with his PID or directly with his name, only change this line:

```
cmd,_ := exec.Command("tasklist","/FI", "IMAGENAME eq yourprocessname.exe").Output()

```