Wednesday 16 March 2011

multi page web apps

ok so i found and adapted a bit of JS from iWebKit 5 that lets you make links to in web app mode that load in the same page which stops safari opening all the time if that makes sense

var multipage;

multipage=window.onload=function()
{
function fullscreen()
{
var a=document.getElementsByTagName("a");
for(var i=0;i<a.length;i++)
{


a[i].onclick=function()
{
window.location=this.getAttribute("href");return false
}

}
}
function hideURLbar()
{window.scrollTo(0,0.9)
}
multipage.init=function()
{
fullscreen();hideURLbar()
};
multipage.init()
}

just put the above in a .js file and linked it to every page and it works 
i win 

Sunday 13 March 2011

arrays of arrays searching arrays, arrays

current


so i need to make another array for the lat lng's then add them to the right nds so need something like if (nds == id add lat , lon )? something like that just so the nds are searched to find the id that is the same to get the nds lat, lng if that makes sense