I declared a variable as global inside
var orid ;
then I used get function inside query from Parse.com ((Here "orid" doesn't save the info ))
query.get("ZL8OcUjnJX", {
success: function(object) {
orid = object.get("OrderId");
},
error: function(object, error) {
// error is an instance of Parse.Error.
}
});
Then I used This function in order to use it inside html tag (( it shows undefined doent show the data from previous function))
function showinfo(){
document.write(orid);}
and I called it inside the html tag to print it in the page
<td id="intro">
<script type="text/javascript">
showinfo();
</script>
</td>
The problem is when I wanna this information to appear in webpage it doesn't do. Also, when I tried
document.write(orid);
inside function "get" it overwrite the page at all