• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 789
  • Last Modified:

_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
0
masterorb
Asked:
masterorb
  • 3
  • 2
1 Solution
 
ZvonkoSystems architectCommented:
Clixk on your IE page with the right mouse button and open the page source view Copy that page html source here for analysis.
0
 
masterorbAuthor Commented:
<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>


0
 
masterorbAuthor Commented:
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>
0
 
ZvonkoSystems architectCommented:
The var _CF_submit_status is defined in the js file: cfform.js
Now when your cfform.js file cannot be opened like that then your web server configuration is wrong.

Test to open in that window the url of the cfform.js file and look where the path goes wrong.
What OS are you using? Windows or Unix?
0
 
masterorbAuthor Commented:
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!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now