jQuery UI Widgets Forums Editors CheckBox, RadioButton PHP and buttons

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 7 years, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • PHP and buttons #11235

    Liquemin
    Member

    Hi,

    I try out to time various input methods. I try with this code send the value “R” to my database. Why it does’nt work?

    <!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>
    <title id='Description'>Eingabemaske der Resistenzen</title>
    <link rel="stylesheet" href="jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="scripts/jquery-1.8.1.min.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxradiobutton.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    $("#jqxradiobutton").jqxRadioButton({ width: 120, height: 25 });
    $("#jqxSubmitButton").jqxButton({ width: '150', height: '25'});
    });
    </script>
    </head>
    <body>
    <form action="input002.php" method="POST">
    <p><div id='jqxradiobutton' value="R" name="E"</div>R</p>
    <div>
    <input style='margin-top: 200px;' type="submit" name="Submit" id='jqxSubmitButton' />
    </div>
    </form>
    </body>
    </html>

    Thanks.

    PHP and buttons #11241

    Peter Stoev
    Keymaster

    Hi Liquemin,

    You can’t set the value in such way. In your PHP code, the value could be either “true” or “false” depending on the button’s state.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    PHP and buttons #11244

    Liquemin
    Member

    Hi Peter,

    thank you for your prompt reply. Now I tried it with checkboxes. Now I’ve gtot an entry in my database. unfortunately isn’t it the correct entry, but it is a little “t”. Do you know a solution for me?

    <!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>
    <title id='Description'>Eingabemaske der Resistenzen</title>
    <link rel="stylesheet" href="jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="scripts/jquery-1.8.1.min.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxradiobutton.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxcheckbox.js"></script>
    <script type="text/javascript" src="scripts/gettheme.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var theme = getTheme();
    // Create jqxCheckBox
    $("#jqxCheckBox").jqxCheckBox({ width: 120, height: 25, theme: theme, value: "R" });
    $("#jqxSubmitButton").jqxButton({ width: '150', height: '25'});
    });
    </script>
    </head>
    <body>
    <form action="input002.php" method="POST">
    <div id='jqxCheckBox' name="E">R</div>
    <div>
    <input style='margin-top: 200px;' type="submit" name="Submit" id='jqxSubmitButton' />
    </div>
    </form>
    </body>
    </html>
    PHP and buttons #11247

    Peter Stoev
    Keymaster

    Hi Liquemin,

    jqxCheckBox does not have a value property, too. It has a ‘checked’ property which could be either true or false. In the PHP, the result of the checkbox will be ‘true’ or ‘false’.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.