Link to home
Start Free TrialLog in
Avatar of RupertA
RupertAFlag for United Kingdom of Great Britain and Northern Ireland

asked on

transfer data from one html page to another html page

Hi there, this may be very easy so please humour my ignorance. I have a situation where I need to pass data in my "notes" variable to another html page and pick it up in a javascript variable on the new html screen. Usually I would send the data to a PHP file and use "GET" to obtain the data. No problems. But just found out PHP is not going to be installed. So I need to do something else.

I was thinking of using one of these two types of ways to submit data from notes to pdfcreate.html.

var notes =  player.GetVar("TextEntry1");
window.location.href = "jsPDF/mod1/pdfcreate.html?" + notes;


var notes = player.GetVar("TextEntry1");"jsPDF/mod1/pdfcreate.html?notesinput="+notes,"_newtab");

The question is on pdfcreate.html, how can I get the data received (notes) into a javascript variable? Thanks. If anyone can give me some code that would be great.
Avatar of arnold
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RupertA


Ok, so in your example, how do I use javascript on page.html to get the query string (some_data_here)? Thanks. It is just one variable I am sending, not multiple.
Avatar of RupertA


so, far I am finding something like this to be OK. will need to test it further.

That is one wy, setting a cookie with the data and then retrieveing it .

you can set one that identifies the variable, another that has the data.
Avatar of RupertA


Thanks arnold, my function was working nicely to retrieve the date from the previous screen. Thanks.