jQWidgets Forums

This topic contains 5 replies, has 4 voices, and was last updated by  Peter Stoev 12 years, 3 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    get value Posts
  • get value #5489

    levieu
    Member

    Hi all!
    Is there a way to get the value of the radiobutton selected?
    I want to do it without using events.

    Thanks

    get value #5543

    Peter Stoev
    Keymaster

    Hi levieu,

    You can use the RadioButton’s checked property to get or set its state.

    For example:

    var isChecked = $("#jqxRadioButton").jqxRadioButton('checked');

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    get value #9069

    robbrandt
    Member

    Checkbox values can’t be used as part of a form submission?

    i.e., dataString = jQuery(“#myForm”).serialize();

    get value #9072

    Peter Stoev
    Keymaster

    Hi Rob,

    You have 2 options as a solution:

    – Add hidden inputs to your Form and update their values depending on the checkbox’s value.
    – Submit the Form with Ajax.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    get value #11810

    Liquemin
    Member

    Hi Peter,

    how can I get the value to my hidden input field from cklicked button:

    <script type="text/javascript">
    $(document).ready(function () {
    var theme = getTheme();
    $("#jqxSubmitButton").jqxButton({ width: '150', height: '25'});
    $("#E").jqxButtonGroup({ theme: theme, mode: 'default' });
    $("#E").bind('buttonclick', function (event) {
    var clickedButton = event.args.button;
    $("#eventsLog").html("Clicked: " + clickedButton[0].id);
    $("#Erythromycin").value(clickedButton[0].id);
    });
    });
    </script>
    </head>
    <body>
    <form action="input007.php" method="POST">
    <div id='E'>
    <button style="padding:4px 16px;" id="Res">R</button>
    <button style="padding:4px 16px;" id="Emed">M</button>
    <button style="padding:4px 16px;" id="Esens">S</button>
    </div>
    <input type="hidden" id ="Erythromycin" name="Erythromycin" value="">
    <div>
    <input style='margin-top: 200px;' type="submit" name="Submit" id='jqxSubmitButton' />
    </div>
    </form>
    <div id="eventsLog" style="margin-top: 10px;">
    </div>

    Where is my error? Please explain me.

    Thanks,

    Liquemin.

    get value #11820

    Peter Stoev
    Keymaster

    Isn’t it more correctly to write: $(“#Erythromycin”).val(clickedButton[0].id); instead of calling a value method?

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.