I used a solution given by "Chrules" found in this discussion:buttons with no href, onclick etc
like this :
<button id="clickable" >Click Me!!</button>
......
$("#clickable").click(function(){
// Send user to this link
insertRecord(); //SQLite Code
location.href = "game.html";
// location.href = "http://www.takemehere.com"; });
So When i used the location.href like he putted it (= "http://www.takemehere.com";) The insertRecord() method is done with success (the object is added to the database)
But when I use the location.href = "game.html"; the game.html page is opened but the insertRecord() method is not done i tried to put the full path of game.html but the same problem persist Have you any idea please ? Thank u in advance