mickeymouse Posted January 8, 2020 Share Posted January 8, 2020 Upon loading, the code works. My form area get highlighted with yellow. In the second case, Java goes through the code but my area does not get highlighted. I also tried calling myload function but that also didn't work - maybe not doing it the right way. <style type='text/css'> .start-here {background-color: yellow;} </style> <script type='text/javascript'> //======================================= function myload() //This code does it's job of highlighting my form starting at field 'all' {var c = document.ReportsForm.all; c.focus(); c.parentNode.className = 'start-here'; c.onblur = function() {this.parentNode.className = '';} } //====================================== function formcheck(myform) {if (all.checked || .checked || liab.checked || inc.checked || exp.checked){;} else {alert('A Type of Account must be selected.'); //This alert takes place. var c = document.ReportsForm.all; // this code has no results c.focus(); // " c.parentNode.className = 'start-here'; // " c.onblur = function() // " {this.parentNode.className = '';} // " alert('TEST IF REACHED'); //This alert takes place. return false } } //=============================================== function formcheck(myform) {if (all.checked || .checked || liab.checked || inc.checked || exp.checked){;} else {alert('A Type of Account must be selected.'); //This alert takes place. window.myload() //This did not result in highlighting. return false } } Link to comment Share on other sites More sharing options...
Funce Posted January 8, 2020 Share Posted January 8, 2020 Have you checked your JavaScript console for errors? It may give you a clue as to what's going on. Link to comment Share on other sites More sharing options...
mickeymouse Posted January 8, 2020 Author Share Posted January 8, 2020 Quote How do we do that? Link to comment Share on other sites More sharing options...
Funce Posted January 8, 2020 Share Posted January 8, 2020 Which browser are you using? You're usually able to get the console by going into the Browser developer tools. On Chrome that's F12 Link to comment Share on other sites More sharing options...
dsonesuk Posted January 8, 2020 Share Posted January 8, 2020 On most if not all browsers its F12. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now