Difference between revisions of "In-line Error Association"

From Level Access Web Labs
Jump to navigation Jump to search
Line 6: Line 6:
 
         </head>
 
         </head>
 
         <script>
 
         <script>
        function toggleError(event.preventDefault()) {
+
        function toggleError() {
 
var error = document.getElementById("firstNameError");
 
var error = document.getElementById("firstNameError");
  
Line 20: Line 20:
 
                         <br />
 
                         <br />
 
                         <span id="firstNameError" style="display: none;">Error: Please enter a name.</span>
 
                         <span id="firstNameError" style="display: none;">Error: Please enter a name.</span>
                         <button onclick="toggleError()">Submit</button>
+
                         <button onclick="toggleError(event.preventDefault();)">Submit</button>
 
                 </form>
 
                 </form>
 
         </body>
 
         </body>
 
</html>
 
</html>
 
[[Category:ARIA]]
 
[[Category:ARIA]]

Revision as of 20:02, 14 February 2018

Page for testing in-line error messages.

In-line Error Association Testing

Sample Form

Activate the Submit button to toggle the in-line error.