I am not sure if this is possible, but I am getting a variable after some text input from the user. This variable is obtained in Javascript, but I need it later in the HTML body tag of my code. Is there a way to do this?
This is the Javascript code:
<script type="text/javascript">
window.alert("Documento ha sido adjuntado!")
<!--
var name = prompt("Referencia del Documento: ", "");
//-->
window.close();
</script>
You could include a hidden element within your page and set the value you need within the hidden value, then when you need to reuse it, just reference the hidden field.
Working Example (Uses a textbox as opposed to a hidden field for viewing purposes)
HTML:
Javascript:
As per your specific question: