Link to home
Start Free TrialLog in
Avatar of masterorb
masterorb

asked on

_CF_submit_status variable is making my page have yellow exclamation point (JavaScript?) in IE

Hello, I am using IE 7 to browse a page I'm developing. In IE 7, I get the annoying yellow exclamation point at the lower left of page (see image).

In the past I have seen this associated with JavaScript errors. However, in error window, it says problem is that '_CF_submit_status is undefined'

Does anyone know what this variable is and how I can make it defined so the page looks good?

Thank you!
-CF-submit-status.png
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Clixk on your IE page with the right mouse button and open the page source view Copy that page html source here for analysis.
Avatar of masterorb
masterorb

ASKER

<script type="text/javascript" src="../../../opt/coldfusion8/wwwroot/CFIDE/scripts/cfform.js"></script>
<script type="text/javascript" src="../../../opt/coldfusion8/wwwroot/CFIDE/scripts/masks.js"></script>

<script type="text/javascript">
    if (window.ColdFusion) ColdFusion.required['j_username']=true;
</script>

<script type="text/javascript">
    if (window.ColdFusion) ColdFusion.required['j_password']=true;
</script>
<script type="text/javascript">
<!--
    _CF_submit_status["CFForm_1"]=null;
    _CF_checkCFForm_1 = function(_CF_this)
    {
        //return false if form submit button has already been pressed once
        if( _CF_submit_status[_CF_this.name] == "submitting" ) return false;
        //reset on submit
        _CF_submit_status[_CF_this.name] = "submitting";
        _CF_error_exists = false;
        _CF_error_messages = new Array();
        _CF_error_fields = new Object();
        _CF_FirstErrorField = null;

        //form element j_username required check
        if( !_CF_hasValue(_CF_this['j_username'], "TEXT", false ) )
        {
            _CF_onError(_CF_this, "j_username", _CF_this['j_username'].value, "Enter a username.");
            _CF_error_exists = true;
        }

        //form element j_password required check
        if( !_CF_hasValue(_CF_this['j_password'], "PASSWORD", false ) )
        {
            _CF_onError(_CF_this, "j_password", _CF_this['j_password'].value, "Enter a password.");
            _CF_error_exists = true;
        }


        //display error messages and return success
        if( _CF_error_exists )
        {
            if( _CF_error_messages.length > 0 )
            {
                // show alert() message
                _CF_onErrorAlert(_CF_error_messages);
                // set focus to first form error, if the field supports js focus().
                if( _CF_this[_CF_FirstErrorField].type == "text" )
                { _CF_this[_CF_FirstErrorField].focus(); }

                _CF_submit_status[_CF_this.name] = null;
            }
            return false;
        }else {
            return true;
        }
    }
//-->
</script>

       
        <title>Omitted</title>
        <form name="CFForm_1" id="CFForm_1" action="omitted.cfm" method="post" onsubmit="return _CF_checkCFForm_1(this)">
<TABLE>
    <TR>
        <TD colspan="2">Please log in.</TD>
    </TR>
    <TR>
        <TD>username:</td>
        <TD><input name="j_username" id="j_username"  type="text" /></td>
    </tr>
    <TR>
        <TD>password:</td>
        <TD><input name="j_password" id="j_password"  type="password" /></td>
    </tr>
    <TR>
        <TD colspan="2"><small>You must have cookies enabled to proceed.</small></td>
    </tr>
</table>






<input name="submitButton" id="submitButton"  type="submit" value="Login" /> <input type='hidden' name='j_username_CFFORMREQUIRED' value='Enter a username.'>
<input type='hidden' name='j_password_CFFORMREQUIRED' value='Enter a password.'>
</form>
<script type="text/javascript" src="../../../opt/coldfusion8/wwwroot/CFIDE/scripts/cfform.js"></script>
<script type="text/javascript" src="../../../opt/coldfusion8/wwwroot/CFIDE/scripts/masks.js"></script>

<script type="text/javascript">
    if (window.ColdFusion) ColdFusion.required['j_username']=true;
</script>

<script type="text/javascript">
    if (window.ColdFusion) ColdFusion.required['j_password']=true;
</script>
<script type="text/javascript">
<!--
    _CF_submit_status["CFForm_1"]=null;
    _CF_checkCFForm_1 = function(_CF_this)
    {
        //return false if form submit button has already been pressed once
        if( _CF_submit_status[_CF_this.name] == "submitting" ) return false;
        //reset on submit
        _CF_submit_status[_CF_this.name] = "submitting";
        _CF_error_exists = false;
        _CF_error_messages = new Array();
        _CF_error_fields = new Object();
        _CF_FirstErrorField = null;

        //form element j_username required check
        if( !_CF_hasValue(_CF_this['j_username'], "TEXT", false ) )
        {
            _CF_onError(_CF_this, "j_username", _CF_this['j_username'].value, "Enter a username.");
            _CF_error_exists = true;
        }

        //form element j_password required check
        if( !_CF_hasValue(_CF_this['j_password'], "PASSWORD", false ) )
        {
            _CF_onError(_CF_this, "j_password", _CF_this['j_password'].value, "Enter a password.");
            _CF_error_exists = true;
        }


        //display error messages and return success
        if( _CF_error_exists )
        {
            if( _CF_error_messages.length > 0 )
            {
                // show alert() message
                _CF_onErrorAlert(_CF_error_messages);
                // set focus to first form error, if the field supports js focus().
                if( _CF_this[_CF_FirstErrorField].type == "text" )
                { _CF_this[_CF_FirstErrorField].focus(); }

                _CF_submit_status[_CF_this.name] = null;
            }
            return false;
        }else {
            return true;
        }
    }
//-->
</script>

       
        <title>Omitted</title>
        <form name="CFForm_1" id="CFForm_1" action="omitted.cfm" method="post" onsubmit="return _CF_checkCFForm_1(this)">
<TABLE>
    <TR>
        <TD colspan="2">Please log in.</TD>
    </TR>
    <TR>
        <TD>username:</td>
        <TD><input name="j_username" id="j_username"  type="text" /></td>
    </tr>
    <TR>
        <TD>password:</td>
        <TD><input name="j_password" id="j_password"  type="password" /></td>
    </tr>
    <TR>
        <TD colspan="2"><small>You must have cookies enabled to proceed.</small></td>
    </tr>
</table>






<input name="submitButton" id="submitButton"  type="submit" value="Login" /> <input type='hidden' name='j_username_CFFORMREQUIRED' value='Enter a username.'>
<input type='hidden' name='j_password_CFFORMREQUIRED' value='Enter a password.'>
</form>


I'm sorry I pasted that twice and I don't know how to modify comment!

It repeats at
<script type="text/javascript" src="../../../opt/coldfusion8/wwwroot/CFIDE/scripts/cfform.js"></script>
<script type="text/javascript" src="../../../opt/coldfusion8/wwwroot/CFIDE/scripts/masks.js"></script>
ASKER CERTIFIED SOLUTION
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I understand. Fixed it. The problem was that in the CF Administrator, the directory for ScriptSrc Directory was set to the wrong path. When I changed it to "CFIDE/scripts", message went away.

Thank you!