kalster Posted December 14, 2014 Share Posted December 14, 2014 I have short urls on the same page that this javascript code is on. the problem is that the code now can't find the poll.php. I have tried the full path and full url to the poll.php, but the code still outputs file not found. how to get this code working? $.post('poll.php', $(this).serialize(), function(data, status){ Quote Link to comment https://forums.phpfreaks.com/topic/293095-javascript-cant-find-file-404/ Share on other sites More sharing options...
requinix Posted December 15, 2014 Share Posted December 15, 2014 Taking a guess, The URL has to be absolute. That means a leading slash and the full path to where poll.php is. $.post('/path/to/poll.php', $(this).serialize(), function(data, status){ Quote Link to comment https://forums.phpfreaks.com/topic/293095-javascript-cant-find-file-404/#findComment-1499582 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.