Here is how you can send data from one page to another:
lets say we want to send the string "Sid is a great man" to page 2, we do this
var string = "Sid is a great man"
document.location = "page2.html?string=" + string
then page two can read the string as follows:
Note. I have NOT tried this code out. tell me if there are errors.Code:<input type="hidden" name="MyHidden"> <script language="JavaScript"> document.getElementById('MyHiddden').value = document.location if (document.getElementById('MyHiddden').value.search('string=') != -1) { var string = document.getElementById('MyHiddden').value.substring(document.getElementById('MyHiddden').value.search('string='),document.getElementById('MyHiddden').value.length) alert(string) } </script>




Reply With Quote