You can send info from one page to another using the ? at the end of the URL. On the input page, dynamically link to the page to which you want to send the data, with something like "?myInput=this" at the end of the URL. Then you can retrieve it with Javascript in the receiving page like this:
myInput = parseInt(getValue("myInput"));
function getValue(varname)
{
// First, we load the URL into a variable
var url = window.location.href;
// Next, split the url by the ?
var qparts = url.split("?");
// Check that there is a querystring, return "" if not
if (qparts.length == 0)
{
return "";
}
// Then find the querystring, everything after the ?
var query = qparts[1];
// Split the query string into variables (separates by &s)
var vars = query.split("&");
// Initialize the value with "" as default
var value = "";
// Iterate through vars, checking each one for varname
for (i=0;i<vars.length;i++)
{
// Split the variable by =, which splits name and value
var parts = vars.split("=");
// Check if the correct variable
if (parts[0] == varname)
{
// Load value into variable
value = parts[1];
if you are opening the page using javascript, or are attempting to change the field in one page in one window from another page in another window, this can also be done with javascript.
under what circumstances will you be using this functionality?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.