I am currently using javascript and trying to pass information as query string....i am able to send data in query string through javascript but want to pass in JSON format.....
Ex: url?[{"Key":"value"},{"Key":"value"}]
So that i can extract it...
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript">
function call()
{
var name = document.getElementById("uname").value;
var file = document.getElementById("file").value;
alert(name + file);
}
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function()
{
if(xhttp.status == 200 && xhttp.readyState == 4)
{
var response = xhttp.responseText;
document.getElementById("demo").innerHTML = response ;
}
xhttp.open("GET","http://127.0.0.1/Jarvis/json.html?name="+JSON.parse(response)+"&file="+file+"&submit=Submit",true);
xhttp.send();
}
</script>
</head>
<body>
<form action="" method="get" >
<input type="text" name="name" id="uname"/><br/><br/>
<input type="file" name="file"id="fname" size="50"/><br/><br/>
<input type="submit" name="submit" value="Submit"/>
</form>
<p id="demo"></p>
</body>
</html>