www.webdeveloper.com
Results 1 to 7 of 7

Thread: onclick="submitForm use with jquery together

  1. #1
    Join Date
    Apr 2011
    Posts
    36

    onclick="submitForm use with jquery together

    onclick="submitForm use with jquery together , I want to handle if the use disable the javascript , the form is not allow to submit

  2. #2
    Join Date
    Apr 2010
    Location
    Salem,Ma
    Posts
    623
    you might want to rephrase that, your words dont make much sense.

    if you mean you dont want people to be able to submit the form if they dont have JS enabled, then jsut hdie the form with CSS using display:none on the form, and display the form on onload with JS. that way if they hav JS turned off the form will not show.

  3. #3
    Join Date
    Apr 2011
    Posts
    36
    that is nice sugestions, how to handle it

  4. #4
    Join Date
    Apr 2010
    Location
    Salem,Ma
    Posts
    623
    Code:
    $(document).ready(function(){
    $("#nojs").hide();
    $("#idofform").show();
    });

    HTML Code:
    <div id="nojs">This site requires Javascript to be enabled in order to process this form</div>
    <form id="idofform" action="test.php" style="display:none;">
    </form>

  5. #5
    Join Date
    Apr 2011
    Posts
    36

    Wink

    Thank you for the suggestion,
    but hidden the form is not that user friendly,
    I use the only way add the following on the head can i use you way , let jquery to handle the redirect ?
    <noscript>
    <meta http-equiv="Refresh"content="1;url=warring.jsp" />
    </noscript>

  6. #6
    Join Date
    Apr 2010
    Location
    Salem,Ma
    Posts
    623
    no. if they have javascript turned off, then jQuery also wil not work becuase it is also javascript

  7. #7
    Join Date
    Apr 2011
    Posts
    36
    thank you

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles