javascript - how to pass an array from one html to another html page? -


i using phonegap so,i prefer solution in javascript.

i found many solutions using php.thats why thought of making clear.

well array,whose vales database.i want pass array second html page.

to pass variable following code being used...

edit:

 window.location.href="1stpage.html"?var1=&value; 

hope, right coding.

please,guide me,if wrong.

changes reference answer suggested

julio meca hansen sir,i tried implementing same

 window.location.href='1st page.html?var1=5&var2=6';  

and tried verifying printing values on second page...

console.log("value1: "+var1 +"value2: "+var2 );  

alas!,i error...

e/web console(12476): referenceerror: can't find variable: var1 @ file:///android_asset/www/1st%20page.html?var1=5&var2=6:17  

if code linked image, more this:

<img src="images/img1.png" alt="" onclick="window.location.href='1stpage.html?var1=5&var2=6';"> 

modify fit needs :p


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -