Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2013
    Posts
    141
    Thanks
    22
    Thanked 0 Times in 0 Posts

    check if function is not called

    I have the following function:
    Code:
    function clickEvent1( theForm )
    {
    	return valDate2(document.form.dateColl);;
    }
    I have another function:
    Code:
    function check()
    {
    	if(!clickEvent1.called)
    	{
    		return message();
    	}
    }

    And another:
    Code:
    function message()
    {
    	if(confirm('Are you Sure?'))
    		{
    			return true;
    		}else
    		{
    			return false;
    		}
    }
    The idea here is that in the check function I want to run a check to see if the clickEvent1 function has not been called and if it has not been called then call the message function. When I tested it the clickEvent1 function is being called correctly but when I test it to call the message function it is not being called.
    Any help would be greatly appreciated thanks.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    PHP Code:
    function clickEvent1theForm )
    {
        
    clickEvent1.called true;
        return 
    valDate2(document.form.dateColl);;


  • #3
    Regular Coder
    Join Date
    Aug 2013
    Posts
    141
    Thanks
    22
    Thanked 0 Times in 0 Posts
    got it thanks, appreciate the input


  •  

    Posting Permissions

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