Julio Poc Robles
Julio Poc Robles

Reputation: 3

HTML5 call variables form other pages

So i'm trying to implement this javascript function into an html page, but i need to call other variables from other pages.

  function concatWord(a,b,c,d,e,f,g,z)
{   
    var General = "Please send"+a+"to"+b+"as"+c+"works in"+d+"at"+e+"with"+f+"in the house of"+g+"using the hashtag"+g+"Thanks";

        return General;
}

So the variables the function receive are in seven different pages (a and z are in the same page), does anyone know how to call them? Thank you.

Upvotes: 0

Views: 142

Answers (1)

Andrei Nemes
Andrei Nemes

Reputation: 3122

JavaScript is an interpreted language, it only lives as long as the page does. To pass variables in-between pages, you need to use a database system to save them. If you are using HTML5, have a look at Local Storage, which allows you to store persistent information across pages without involving a server.

Upvotes: 2

Related Questions