Hello, I've got a news and guestbook system created on my website working with use of a database. The id (in my database table) is being used to remove a post. A jscript does the following: function confirmRemove(var_id){ if(confirm('Wilt u deze post echt verwijderen?')){ window.location.href = 'index.php?page=gastenboek&do=remove&id=' + var_id + '#anc'; } } Code (markup): When I hover over a link directed to this function the var_id is correct (let's say the id is 090414144354). But when I click the link the var_id is missing the leading zero (so the id becomes 90414144354). This causes my file not to be deleted of course cause it is not found.
The problem looks like Javascript is treating the parameter like an integer, not a string. Integers don't have leading zeros. I don't know how you're calling the function but confirmRemove(090414144354); would cause this problem - you'd need to do confirmRemove('090414144354');