Question: I want to auto-reload the page after completion of the action of the form.

The code for my form is:

```
<form method="post" enctype="multipart/form-data" id="upload" action="<%=(String)request.getAttribute("base_url")%>files/upload/">

```

Answer: 
Try below code.

```
var deviceInfo = ''

var deviceInfo = '';

deviceInfo += 'Model = ' + getModel() + ',';
deviceInfo += 'cordova_version = ' + cordovaVersion() + ',';

deviceInfo += 'OS = ' + getOS() + ',';

alert(deviceInfo)

function getModel() {
    return "GT-N8000"
}

function cordovaVersion() {
    return "3.6.4"
}

function getOS() {
    return "Android"
}

```
u are using variables as part of your string:

> 
> `var myVar = "string"; alert(myVar);` its the same of doing
>  `alert("string");`but doing `alert("myVar")` will alert your var
>  name as a string
> 
> 
> 

so in your case:

```
deviceInfo = "MODEL = "+getModel()+", CORDOVA_VERSION = "+cordovaVersion()+", OS = "+getOS();

```

[the fiddle](https://jsfiddle.net/61mo8u7a/)