We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10450
    • 30 Posts
    hey thr

    can anyone help me for this.....

    I have created one snnipet "loginbox" and paste the following code

    <?php
    <script type="text/javascript" src="assets/js/messages.js"></script>;
    <form name="form" id="form" class="form" onsubmit="return
    validate(this)" method="post">
    <input type="text" name="name" id="name" />
    <input type="text" name="password" id="password" />
    <input type="submit" value="Submit" class="submit" id="button"/>
    </form>
    ?>


    message.js file is used for validation of input boxes i.e. username and password and it returns the message like "username caanot be blank etc". I tried a lot but i am still unable to get any result pls help me...............
      • 26903
      • 1,336 Posts
      src="assets/js/messages.js

      Do you have a ’<base href=’ declaration in your template? It may not be finding the javascript, otherwise look at your generated page source to see what is actually being produced.
        Use MODx, or the cat gets it!
        • 16251
        • 24 Posts
        Check messages.js file and validate() method.
        I think the method doesn’t get properly data.

        or simply try rename input:
        <input type="text" name="username" id="username" />
        
          • 10450
          • 30 Posts
          Thank you........
          My problem is solved thank u a lot grin