Question: part of my script looks like this.

```
my @args = ("/bin/updateServer & ");
system (@args) == 0 or die "system @args failed: $?";
reloadServer;

```

My requirement is only after the updateServer finishes, reloadServer has to be called.
In my case reload server runs immeadiately after update server.
UpdateServer runs for around 4 hours and so I have to run it in background with "&"

How can I change my code to run reloadServer only after the updateServer is completed.

Can someone please help me in doing so.

Answer: 
I know this has been answered already, but if you want to follow your original idea, here's the correct code (because Mritunjay's answer only works for one usage per page).

```
var changeIdValue = function (id, value) {
        document.getElementById(id).style.height = value;
    };
window.addEventListener('keydown', function (e) {
    if (e.keyCode === 40) {
        changeIdValue('balklongwaarde', '60px');
    }
});

```

1. addEventListener is written with a capital L in Listener
2. 'onkeydown' should be 'keydown' when used with the addEventListener function
3. You closed your brackets in the wrong order (close if, close function, close function call)
You can say something like this 

```
window.onkeydown = function(e){
        if(e.keyCode == 40)
            changeIdValue("balklongwaard", "60px");
        };

```