The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Javascript Only Form

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #32512

    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.

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.