jQWidgets Forums

Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • in reply to: get value 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.

    in reply to: PHP and buttons 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>
    in reply to: PHP PHP #10917

    Liquemin
    Member

    Hi Peter,

    here is my complete code:

    <!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/jqxmaskedinput.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="scripts/gettheme.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxdatetimeinput.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxcalendar.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxtooltip.js"></script>
    <script type="text/javascript" src="jqwidgets/globalization/jquery.global.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxscrollbar.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxlistbox.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxcheckbox.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxdropdownlist.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxdata.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var theme = getTheme();
    $("#jqxSubmitButton").jqxButton({ width: '150', height: '25'});
    $("#Erstnachweis").jqxDateTimeInput({ width: '250px', height: '25px', theme: theme, formatString: "yyyy-MM-dd", showFooter: true, autoOpen: true});
    //DropDownList Kliniken
    var klinik = [
    {label:"MED1", value: 'MED1'},
    {label:"MED2", value: 'MED2'},
    {label:"MED1", value: 'MED3'},
    {label:"VIS", value: 'VIS'},
    {label:"GEF", value: 'GEF'},
    {label:"GYN", value: 'GYN'},
    {label:"GEBH", value: 'GEBH'},
    {label:"PAED", value: 'PAED'},
    {label:"AMBU", value: 'AMBU'},
    ];
    $("#Klinik").jqxDropDownList({ checkboxes: true, source: klinik, displayMember: "ContactName", valueMember: "CompanyName", width: 200, height: 25, theme: theme, scrollBarSize:13, promptText: "Waehlen Sie die Klinik aus" });
    //DropDownList Stationen
    var station = [
    {label:"SZNA", value: 'SZNA'},
    {label:"1A", value: '1A'},
    {label:"1C", value: '1C'},
    {label:"1D", value: '1D'},
    {label:"2A", value: '2A'},
    {label:"2B", value: '2B'},
    {label:"2C", value: '2C'},
    {label:"2D", value: '2D'},
    {label:"3A", value: '3A'},
    {label:"3B", value: '3B'},
    {label:"3C", value: '3C'},
    {label:"3D", value: '3D'},
    {label:"4A", value: '4A'},
    {label:"4B", value: '4B'},
    {label:"4D", value: '4D'},
    {label:"Dialyse", value: 'Dialyse'},
    {label:"Palli", value: 'Palli'},
    {label:"KiZ 1", value: 'KiZ 1'},
    {label:"KiZ 1c", value: 'KiZ 1c'},
    {label:"KiZ 2", value: 'KiZ 2'},
    {label:"KiZ 3", value: 'KiZ 3'},
    ];
    // Create a jqxDropDownList
    $("#Station").jqxDropDownList({ checkboxes: true, source: station, displayMember: "ContactName", valueMember: "CompanyName", width: 200, height: 25, theme: theme, scrollBarSize:13, promptText: "Waehlen Sie die Station aus" });
    // bind to 'select' event.
    $("#Station").bind('select', function (event) {
    var args = event.args;
    var item = $('#Station').jqxDropDownList('getItem', args.index);
    // get value
    var st = item.value;
    });
    });
    </script>
    </head>
    <body>
    <div id='jqxWidgets'>
    <form action ="input002.php" method = "POST">
    <p><input name="na" class="jqx-input"/> Name</p>
    <p><input name="vn" class="jqx-input"/> Vorname</p>
    <div id='Erstnachweis' name="dt"></div>
    <div id="Klinik" name="kl" style='margin-top: 20px;'></div>
    <div id="Station" name="st" style='margin-top: 20px;'></div>
    <div>
    <input style='margin-top: 200px;' type="submit" name="Submit" id='jqxSubmitButton' />
    </div>
    </form>
    </div>
    </body>
    </html>

    Thank you.

    in reply to: Textinput Textinput #10842

    Liquemin
    Member

    Thanks, it works perfectly.

    Liquemin.

    in reply to: Checkboxes Checkboxes #1633

    Liquemin
    Member

    Hi Peter,

    I had some time ago you described my problem. But unfortunately I have not received a reply. That’s why I want to politely ask if you could perhaps employ you again with my problem.

    Best regards,
    Liquemin.

    in reply to: Checkboxes Checkboxes #1536

    Liquemin
    Member

    Hi Peter,

    However, I suppose that you need to pass the selected item’s value as data–>correct. I want the items that I checked, send with the ajax-call to the php file. And then I want to display the result in #msg, without the page reloading.

    Best regards,
    Liquemin.

    in reply to: Checkboxes Checkboxes #1520

    Liquemin
    Member

    Hi Peter,

    in my first post you can see that I’ve created a form element, to send a certain selection to a php.Datei (checkbox007.php) that my database queries and then sends a result to div id = “msg”. I realized this with form.js, but that does not work anymore, so I tried to program it yourself – without success, so the ajax call is not working as expected

    $('#jqxListBox').bind('select', function (event) {
    var args = event.args;
    var item = $('#jqxListBox').jqxListBox('getItem', args.index);
    // get value
    var value = item.value;
    });
    $("#jqxSubmitButton").bind('click', function () {
    $.ajax({
    type: "POST",
    url: "checkbox007.php",
    data: 'value',
    dataType:'json',
    success : function(data){
    $(#'msg').text(data);
    }
    });

    can you explain me where is my fault.

    Best regards,
    Liquemin.

    in reply to: Checkboxes Checkboxes #1500

    Liquemin
    Member

    Hi Peter,

    thankyou for your prompt response. because the form.js not work anymore, so I try to recreate the form-element using jQWidgets. But it does’nt works.
    First: the Reset-Button. It works, but I find it cumbersome to write for every checkbox an uncheckIndex. Is there a better code?
    Second: my code to bind the submit-button on the select-box it does’nt works, however to contact my database.
    Can you help me. Forgive me my dilettantism, I’m a rookie in jQuery.

    Here is my code:
    <code><!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" />
    <link rel="stylesheet" href="js/jqwidgets/styles/jqx.base.css" type="text/css" />
    <link rel="stylesheet" href="js/jqwidgets/styles/jqx.shinyblack.css" type="text/css" />
    <script type="text/javascript" src="js/jquery-1.6.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/jqxscrollbar.js"></script>
    <script type="text/javascript" src="js/jqwidgets/jqxlistbox.js"></script>
    <script type="text/javascript" src="js/jqwidgets/jqxcheckbox.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var source = [
    {label: "Ἀμφισσεύς", value: 'Ἀμφισσεύς%'},
    {label: "Δελφὸς", value: 'Δελφὸς%'},
    {label: "Βοήθωι", value: 'Βοήθωι%'},
    {label: "Λιλαιεὺς", value: 'Λιλαιεὺς%'},
    ];
    $("#jqxListBox").jqxListBox({ source: source, checkboxes: true, multiple: true, width: '150', height: '250', theme: 'base', scrollBarSize: 10, enableSelection: false});
    $("#jqxSubmitButton").jqxButton({ width: '150', height: '25', theme: 'base'});
    $("#jqxResetButton").jqxButton({ width: '150', height: '25', theme: 'base'});
    $('#jqxListBox').bind('select', function (event) {
    var args = event.args;
    var item = $('#jqxListBox').jqxListBox('getItem', args.index);
    // get value
    var value = item.value;
    });
    $("#jqxSubmitButton").bind('click', function () {
    $.ajax({
    type: "POST",
    url: "checkbox007.php",
    data: value,
    dataType:'json',
    success: function(){
    $('#msg').fadeIn(200).show();
    }
    });
    });
    $("#jqxResetButton").bind('click', function () {
    $("#jqxListBox").jqxListBox('clearSelection');
    $("#jqxListBox").jqxListBox('uncheckIndex', 0);
    $("#jqxListBox").jqxListBox('uncheckIndex', 1);
    $("#jqxListBox").jqxListBox('uncheckIndex', 2);
    $("#jqxListBox").jqxListBox('uncheckIndex', 3);
    });
    });
    </script>
    </head>
    <body>
    <div id='jqxListBox'>
    </div>
    <div>
    <input style='margin-top: 20px;' type="submit" value="Submit" id='jqxSubmitButton'/>
    </div>
    <div>
    <input style='margin-top: 20px;' type="reset" value="Reset" id='jqxResetButton' />
    </div>
    <div id="msg">
    </div>
    </body>
    </html></code>
    in reply to: Checkboxes Checkboxes #1472

    Liquemin
    Member

    here is the rest of my code, sorry:

    <!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" />
    <link rel="stylesheet" href="js/jqwidgets/styles/jqx.base.css" type="text/css" />
    <link rel="stylesheet" href="js/jqwidgets/styles/jqx.shinyblack.css" type="text/css" />
    <script type="text/javascript" src="js/jquery-1.6.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/jqxscrollbar.js"></script>
    <script type="text/javascript" src="js/jqwidgets/jqxlistbox.js"></script>
    <script type="text/javascript" src="js/jqwidgets/jqxcheckbox.js"></script>
    <script type="text/javascript" src="js/jquery.form.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    $("#Select").jqxListBox({ checkboxes: true, width: '150', height: '150', theme: 'base', scrollBarSize: 10});
    $('#submit').jqxButton({ theme: "base" });
    $('#reset').jqxButton({ theme: "base" });
    $('#htmlForm').ajaxForm({
    target: '#msg'
    });
    });
    </script>
    </head>
    <body>
    <div id='jqxWidget'>
    <form id="htmlForm" action = "checkbox007.php" method = "post">
    <select id="Select" multiple="multiple" name="zusatz[]" >
    <option value='Ἀμφισσεύς%'> Ἀμφισσεύς</option>
    <option value='Δελφὸς%'> Δελφὸς</option>
    <option value='Βοήθωι%'> Βοήθωι</option>
    <option value='Λιλαιεὺς%'> Λιλαιεὺς</option>
    <option value='Ἀμφισσεύς%'> Ἀμφισσεύς</option>
    <option value='Δελφὸς%'> Δελφὸς</option>
    <option value='Βοήθωι%'> Βοήθωι</option>
    <option value='Λιλαιεὺς%'> Λιλαιεὺς</option>
    <option value='Ἀμφισσεύς%'> Ἀμφισσεύς</option>
    <option value='Δελφὸς%'> Δελφὸς</option>
    <option value='Βοήθωι%'> Βοήθωι</option>
    <option value='Λιλαιεὺς%'> Λιλαιεὺς</option>
    </select>
    <input id='submit' type="submit" />
    <input id='reset' type="reset" />
    </form>
    </div>
    <div id="msg">
    </div>
    </body>
    </html>
Viewing 9 posts - 1 through 9 (of 9 total)