I Have 3 html files & 3 js files
index.html,rank.html,score.html
global.js,rank.js,score.js
In index.html I have included rank.html and score.html using iframe.
In global.js I have declare Var rank; & global.js included in rank.html & score.html.
I am updating the value of rank in rank.js and i want to access the updated value in score.js. In score.js I dont get the Updated value It gives UNDEFINED value.
I dont want to include rank.js in score.html so i created global.js & included in html file.
Here is my code,
Index.html
<html> <head> </head> <body> <iframe src="../rank/rank.html" frameborder = "0" scrolling="no" width="50%" height = "100%"></iframe> <iframe src="score.html" frameborder = "0" scrolling="no" width="50%" height = "100%"></iframe> </body> </html> global.js
var rank; score.js
$(document).ready( function(){ setInterval(dataupdate, 10000); }); function dataupdate() { alert(rank) }; rank.js
$(document).ready( function(){ setInterval(dataupdate, 10000); }); function dataupdate() { rank = "first"; }; I want updated value of rank in score.js file how to access that value...
Thanks.....