We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26931
    • 2,314 Posts
    I will go through that link but now i have another problem i installed dbedit plugin
    and i got test_address table in dbedit, but i cant save my another table "message" through dbedit plugin although it is showing me message table in dbedit. but when i clicked on save button it displays error message that "unable to save configuration"
    reading the dbedit module thread other people had this error message too...if you can’t get it working, you could also ask for help in the support thread
    http://modxcms.com/forums/index.php/topic,32720
      • 10450
      • 30 Posts
      hey thr,
      i wanna separate both code i.e. form code and js file. and how to call that js file to take any affect to that form

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>Dynamic Inline Form Validation Demo</title>
      <link rel="stylesheet" type="text/css" href="messages.css" />
      <script type="text/javascript" src="messages.js"></script>
      </head>
      <body>
      <div id="wrapper">
      <form name="form" id="form" class="form" action="success.html" onsubmit="return validate(this)" method="post">
      <label for="name">Full Name:</label>
      <input type="text" name="name" id="name" />
      <label for="password">Password:</label>
      <input type="text" name="password" id="password" />
      <input type="submit" value="Submit" class="submit" />
      </form>
      </div>
      </body>
      </html>

      Thanks
        • 10450
        • 30 Posts
        Quote from: ganesh_1707 at Feb 09, 2010, 11:01 AM

        hey thr,
        i wanna separate both code i.e. form code and js file. and how to call that js file to take any affect to that form

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Dynamic Inline Form Validation Demo</title>
        <link rel="stylesheet" type="text/css" href="messages.css" />
        <script type="text/javascript" src="messages.js"></script>
        </head>
        <body>
        <div id="wrapper">
        <form name="form" id="form" class="form" action="success.html" onsubmit="return validate(this)" method="post">
        <label for="name">Full Name:</label>
        <input type="text" name="name" id="name" />
        <label for="password">Password:</label>
        <input type="text" name="password" id="password" />
        <input type="submit" value="Submit" class="submit" />
        </form>
        </div>
        </body>
        </html>

        Thanks


        pls help me sharkbit
          • 26931
          • 2,314 Posts
          pls help me sharkbit
          hey ganesh_1707,

          to be honest, i’ve got no clue what you want to achieve, or what the problem is ( at least i am ) smiley if you are more specific, i’m sure someone can help you
            • 10450
            • 30 Posts
            Quote from: sharkbait at Feb 11, 2010, 06:30 AM

            pls help me sharkbit
            hey ganesh_1707,

            to be honest, i’ve got no clue what you want to achieve, or what the problem is ( at least i am ) smiley if you are more specific, i’m sure someone can help you

            Thanks sharkbit at least u replied,

            The code which i have posted, i want to implement it in modx. So what i have to do?
            My ques is simple where to put that js file to take effect. i tried lots of thing but i failed. JS file does only validation of input boxes which i include in form. Pls let me know if u r not clear


            <script type="text/javascript" src="messages.js"></script>

            <form name="form" id="form" class="form" action="success.html" onsubmit="return validate(this)" method="post">

            <label for="name">Full Name:</label>
            <input type="text" name="name" id="name" />
            <label for="password">Password:</label>
            <input type="text" name="password" id="password" />
            <input type="submit" value="Submit" class="submit" />
            </form>
              • 26931
              • 2,314 Posts
              My ques is simple where to put that js file to take effect
              you can put it wherever you want, it just needs to be referenced right. e.g. place it in assets -> js -> messages.js
              then you need to reference it like:
              <script type="text/javascript" src="assets/js/messages.js"></script>
              in your header. don’t forget to place
              <base href="[(site_url)]"></base>
              in your header too
                • 10450
                • 30 Posts
                Thanks sharkbait...

                1}
                but i am still unable to get result from it.
                Let me give u the brief code description..

                I 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...............
                -------------------------------------------------------------------------------------

                2}my second query is-

                I have used following syntax for connecting the external database...
                $ds = $modx->db->select(’*’,’database_name.table_name’);

                But i am unable to use join of two table in same database cause this syntax only allows me to select only one table

                i.e. $ds = $modx->db->select(’*’,’database_name.table_name’);

                suppose i have external database XYZ with 5 tables...
                i wanna join two tables of XYZ database let say Table "A" and Table "B"

                But with the syntax i.e.
                $ds = $modx->db->select(’*’,’database_name.table_name’);

                i can select only one table....

                Pls help
                Thanks.....
                • It’s the FROM clause, you can add as many tables as you want, or even add JOIN clauses in that same method parameter:
                  $ds = $modx->db->select('t1.*','database_name.table_name t1, database_name.table_name2 t2');

                  $ds = $modx->db->select('t1.*, t2.field','database_name.table_name t1 JOIN database_name.table_name2 t2 ON t2.fk = t1.pk');
                    • 10450
                    • 30 Posts
                    Quote from: OpenGeek at Feb 17, 2010, 03:11 PM

                    It’s the FROM clause, you can add as many tables as you want, or even add JOIN clauses in that same method parameter:
                    $ds = $modx->db->select('t1.*','database_name.table_name t1, database_name.table_name2 t2');

                    $ds = $modx->db->select('t1.*, t2.field','database_name.table_name t1 JOIN database_name.table_name2 t2 ON t2.fk = t1.pk');


                    Thank you sir,

                    can you 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...............