mickeymouse 0 Posted January 8, 2020 Report 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 } } Quote Link to post Share on other sites
Funce 42 Posted January 8, 2020 Report 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. Quote Link to post Share on other sites
mickeymouse 0 Posted January 8, 2020 Author Report Share Posted January 8, 2020 Quote How do we do that? Quote Link to post Share on other sites
Funce 42 Posted January 8, 2020 Report 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 Quote Link to post Share on other sites
dsonesuk 913 Posted January 8, 2020 Report Share Posted January 8, 2020 On most if not all browsers its F12. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.