Jump to content

Java code not producing result.


mickeymouse
 Share

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...