Jump to content

Muiter

Members
  • Content count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Muiter

  • Rank
    Member

Contact Methods

  • Website URL
    www.torza.nl

Profile Information

  • Gender
    Male
  • Location
    Netherlands

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Muiter

    Bootstrap toggle JS not sending data

    The problem still exists when I remove the edit and delete forms.
  2. Muiter

    Bootstrap toggle JS not sending data

    OK, I moved it to an place where you can test this yourself. See here for function without BootstrapToggele: https://torza.nl/toggle_no_issue.php See here for function with BootstrapToggele: https://torza.nl/toggle_issue.php Click on the mail icon to test. When te form is send I have used: print_r($_POST); exit; The form without BootstrapToggele has the correct value on the end of this ([mail_dossier_gereed] => ja), the form with BootstrapToggele does not have this value.
  3. Muiter

    Bootstrap toggle JS not sending data

    OK, but all the normal form textfields in the same form are not losing there data, why should be that any different for the checkbox? (also this did not solve my problem)
  4. Muiter

    Bootstrap toggle JS not sending data

    I don't understand what you mean? I have checked the form output there and it is not showing up when I use Bootstrap Toggle. It showing up when I use an standard checkbox.
  5. Muiter

    Bootstrap toggle JS not sending data

    When I add an extra check like this: onclick="validate(this, '.$i.')" <script> function validate(selectVeld, nr) { window.alert("You clicked me"); } </script> When I have not used the Bootstrap Toggle I get the message "You clicked me", but when I add Bootstrap Toggle I am not getting the message.
  6. Muiter

    Bootstrap toggle JS not sending data

    I have changed all URLs to absolute. Did not solve the problem. This is the JS I am using so send the form. $(document).ready(function () { $(".mail_table_4").on('click', function() { formid=($(this).attr("alt")); subform_mail_table_4(formid); }); }); function subform_mail_table_4(formid) { var postData = $("#mail_table_4"+formid).serializeArray(); var formURL='processing/factuur_mail.php'; $.ajax({ url: formURL, type: "POST", data: postData, success: function(data, textStatus, jqXHR) { $('#modal_mail_table_4'+formid+' .modal-body').html(data); $("#submit_mail_table_4"+formid).remove(); }, error: function(jqXHR, status, error) { console.log(status + ": " + error); } }); e.preventDefault(); }
  7. I am using Bootstrap Toggle in my script. I have it included like this: <!-- jQuery --> <script src="vendor/jquery/jquery.min.js"></script> <!-- Toggele http://www.bootstraptoggle.com --> <script src="vendor/bootstrap-toggle/bootstrap-toggle.min.js"></script> <!-- Toggele CSS --> <link href="vendor/bootstrap-toggle/bootstrap-toggle.min.css" rel="stylesheet"> So when I use a checkbox as a normal checkbox without the Bootstrap Toggle markup the value (when box is checked) it is send with the form. When I add the Bootstrap Toggle to this the value is not send (when checked) <div class="col-md-2 text-center" style="padding-top: 20px;"> <input type="checkbox" id="mail_dossier_gereed['.$i.']" name="mail_dossier_gereed" value="ja" data-width="200" data-toggle="toggle" data-toggle="toggle" data-size="large" data-onstyle="success" data-offstyle="info" data-on="Project is afgerond" data-off="Project niet afgerond" checked> </div> I have checked this with print_r($_POST). The form where this checkbox is located in a bootstrap modal, this modal is located in my subfolder modal. When I use this kind of checkbox in a file that is located in the root of my server, then Bootstrap Toggle is correctly sending the value (when checked). Any suggestions why this not might work when the file is located in a modal? The form of the modal is send thru JS, maybe that is also an issue, but I don't think so because an normal checkbox is send correctly (when checked)
  8. You are correct, thank your for this tip. This did do the trick for me. <script> $(document).ready(function() { var $sigdiv = $("#signature") $sigdiv.jSignature() // inits the jSignature widget. // after some doodling... $sigdiv.jSignature("reset") // clears the canvas and rerenders the decor on it. }) </script> <script> function copy() { // signature var $sigdiv = $("#signature") var datapair = $sigdiv.jSignature("getData", "svgbase64") document.getElementById("signature_svg").value = datapair[1]; }
  9. I have this script running, the user can place it's signature: https://willowsystems.github.io/jSignature/#/about But I am not succeeding in getting the`svg` information that was generated copied to an text field so I can send it with this html form to my database. <div id="signature"></div> <textarea id="signature_svg" rows="5" cols="50"></textarea> . <script src="vendor/jsignature/jSignature.min.js"></script> <script> $(document).ready(function() { var $sigdiv = $("#signature") $sigdiv.jSignature() // inits the jSignature widget. // after some doodling... $sigdiv.jSignature("reset") // clears the canvas and rerenders the decor on it. // Getting signature as SVG and rendering the SVG within the browser. // (!!! inline SVG rendering from IMG element does not work in all browsers !!!) // this export plugin returns an array of [mimetype, base64-encoded string of SVG of the signature strokes] var datapair = $sigdiv.jSignature("getData", "svgbase64") var i = new Image() i.src = "data:" + datapair[0] + "," + datapair[1] $(i).appendTo($("#signature_svg")) // append the image (SVG) to DOM. $("#signature").bind('change', function(e){ document.getElementById('signature_svg').value; }) }) </script> I am not detecting any errors in my *console*. Any suggestions how to get the information of signature into signature_svg so I can send the form with this information?
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.