I need to create a form that is run entirely by javascript and someone who has javascript disabled can’t submit it. At the moment I have a form without a submit button and then when the page has loaded javascript adds the code for the submit button. Ideally I don’t want the page to refresh itself either, so when the user click submit I was thinking of using AJAX to send data to a php file and login or register.
Is this something anyone has ever done? I guess i’m interested if anyone can find any security issues with it…
Also when the user clicks my submit button the page refreshes itself, if I don’t want this to happen should I remove the ‘input type submit’ and add a ‘a tag’ or just a ‘div’ and have javascript detect when it has been pressed or is there a way to stop the page getting refreshed when its clicked?
Many Thanks for reading this long post.
Chris