jQWidgets Forums

jQuery UI Widgets Forums Plugins Validator, Drag & Drop, Sortable IE Error for validator.js

This topic contains 3 replies, has 3 voices, and was last updated by  Minko 12 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • IE Error for validator.js #5798

    hardcode
    Member

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
    Timestamp: Mon, 9 Jul 2012 20:23:47 UTC

    Message: ‘position’ is null or not an object
    Line: 7
    Char: 4142
    Code: 0
    URI: http://localhost/Lovely%20Tankers/js/jqwidgets/jqxvalidator.js

    I have this error on all the pages that i have the jqxvalidator.js
    This error only pops up in internet explorer
    Please how best can i be helped with this error

    thank you

    IE Error for validator.js #5802

    Peter Stoev
    Keymaster

    Hi hardcode,

    Could you please send us a sample which reproduces the reported issue? I am afraid that we are unable to debug it on your localhost.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    IE Error for validator.js #5808

    hardcode
    Member
    <?php if(!isset($_SESSION)) session_start();?>
    <!DOCTYPE html>
    <html>
    <head>
    <title>Home::J.K. Horgle Transport Ltd</title>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <link href="css/admin.css" rel="stylesheet" type="text/css" />
    <!-- provides menu-->
    <link rel="stylesheet" href="js/jqwidgets/styles/jqx.base.css"type="text/css" />
    <link rel="stylesheet" href="js/jqwidgets/styles/jqx.energyblue.css" type="text/css" />
    <!--provides jqwidgets scripts-->
    <script type="text/javascript" src="js/scripts/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="js/jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="js/jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="js/jqwidgets/jqxvalidator.js"></script>
    <script type="text/javascript" src="js/scripts/gettheme.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var theme = 'energyblue';
    $("#Loginbutton").jqxButton({ width: '150', height: '30', theme: theme });
    $('#Loginbutton').bind('click', function () {
    $('#login_form').jqxValidator('validate');
    });
    $('#login_form').jqxValidator({
    rules: [
    { input: '#user_id', message: 'E-mail is required!', action: 'keyup', rule: 'required' },
    { input: '#user_id', message: 'Invalid e-mail!', action: 'keyup', rule: 'email' },
    { input: '#p_id', message: 'Password is required!', action: 'keyup', rule: 'required' },
    ], theme: theme
    });
    $('#login_form').jqxValidator({ onSuccess: function () { $('#login_form').submit();} });
    });
    </script>
    </head>
    <body>
    <div id="main">
    <div id="header"> <a href="#" class="logo">
    <div id="mainlogo"></div>
    </a> </div>
    <div class="top-bar" style="border:none; width:650px; margin-right:250px;">
    <h1>J.K. HORGLE TRANSPORT LTD</h1>
    </div>
    <div id="middle" >
    <div id="left-column"></div>
    <div id="center-column" style="width:500px; height:350px; margin-top:10px;">
    <div class="top-bar" style="border:none;">
    <h1>Login Page</h1>
    </div>
    <div class="select-bar"></div>
    <div id="login">
    <form method="post" id="login_form" action="phpfiles/login.php">
    <table width="250" cellpadding="5" style="font-size:15px; padding:0;">
    <tr><td colspan="2" style="font-size:12px; color:#F00;">
    <?php
    //echo $_SESSION['error'];
    //$_SESSION['error'] =""
    ?></td>
    </tr>
    <tr>
    <td width="128" align="right"><label>Email: </label></td>
    <td width="268"><input type="text" size="30" name="user" id="user_id" class="txt"/></td>
    </tr>
    <tr>
    <td align="right"><label>Password: </label></td>
    <td><input type="password" size="30" name="p" id="p_id" class="txt" /></td>
    <tr>
    <td></td>
    <td align="right"><button type="button" value="Login" id="Loginbutton">Login</button></td>
    </tr>
    </table>
    </form>
    </div>
    </div>
    </div>
    <div id="footer">
    <hr />
    <p>Copyright@J.K. Horgle Transport Ltd 2012::Developed by Lawrence Ameku</p>
    </div>
    </div>
    </body>
    </html>

    Here is the sample code for my login page and this is how I have validate almost all my pages. Only internet explorer gives this error….
    Thank you..

    IE Error for validator.js #5812

    Minko
    Blocked

    Hi hardcode,

    Internet Explorer versions <= 8 are dealing the arrays in a little bit different way. Remove your last comma from the rules array and I guess that the error will be fixed.
    Here is the code without the last comma:

    JavaScript

    <script type="text/javascript">
    $(document).ready(function () {
    var theme = 'energyblue';
    $("#Loginbutton").jqxButton({ width: '150', height: '30', theme: theme });
    $('#Loginbutton').bind('click', function () {
    $('#login_form').jqxValidator('validate');
    });
    $('#login_form').jqxValidator({
    rules: [
    { input: '#user_id', message: 'E-mail is required!', action: 'keyup', rule: 'required' },
    { input: '#user_id', message: 'Invalid e-mail!', action: 'keyup', rule: 'email' },
    { input: '#p_id', message: 'Password is required!', action: 'keyup', rule: 'required' }],
    theme: theme
    });
    $('#login_form').jqxValidator({ onSuccess: function () { $('#login_form').submit(); } });
    });
    </script>

    Best regards,
    Minko

    jQWidgets Team
    http://jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.