Jump to content

Muiter

Members
  • Posts

    111
  • Joined

  • Last visited

Posts posted by Muiter

  1. 17 hours ago, Ingolme said:

    Actually, the main issue here is that there is no onchange event on div elements. You're either going to have to run a script periodically to check for changes or have a button that the user clicks to fill in the textarea. Either one of those two solutions would have to call a function like this one:

    
    function updateTextarea() {
      document.getElementById("signature_svg").value = document.getElementById("signature").innerHTML
    }

     

    Thanks, 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];
    }
  2. 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?

  3. Any suggestions please ow to change the code below because I would like yo use the standard browser validation.

    Quote

    <script type="text/javascript">
    $(document).ready(function () {
        $(".edit_table_1").on('click', function() {
            formid=($(this).attr("alt"));
            subform_edit_table_1(formid);
        });
    });
    function subform_edit_table_1(formid)
    {
           var postData = $("#edit_table_1"+formid).serializeArray();
           var formURL='includes/adres_edit_proces.php';
            $.ajax({
                url: formURL,
                type: "POST",
                data: postData,
                success: function(data, textStatus, jqXHR) {
                    $('#modal_edit_table_1'+formid+' .modal-body').html(data);
                    $("#submit_edit_table_1"+formid).remove();
                    $("#submit_edit_table_1_2nd"+formid).remove();
                },
                error: function(jqXHR, status, error) {
                    console.log(status + ": " + error);
                }
            });
            e.preventDefault();
    }
    </script>

     

    Quote

    <button type="button" class="btn btn-info edit_table_1" id="submit_edit_table_1'.$i.'" alt="'.$i.'">Bewerk</button>

     

  4. I am trying to get an query to see the total amount of invoices to paid per week when paying invoice at 60 days after receiving.


    The query I have is running without problem but the results can not be correct. What might be causing the unexpected result?


    In the query below I am trying to get the total amount of invoices to be paid in week 52/2015 with the invoice date of 60 days before week 52.



    When using 30 and 60 days I have the result as below, but the total should be around 364k. (Don't mind the forst row, it's an different query)


    LedDH.png



    SELECT
    SUM(amount) AS amount
    FROM invoices
    WHERE date_paid = '0000-00-00' AND WEEK(DATE_ADD(date_recieved, INTERVAL 60 DAY)) = 52 AND YEAR(DATE_ADD(date_recieved, INTERVAL 60 DAY)) = 2015

  5. Example.

    I have a list of weeks

    45 2013

    46 2013

    47 2013

    48 2013

    49 2013

    50 2013

    51 2013

    52 2013

    01 2014

    02 2014

     

    How can I check if week 45 is the last week of an month.

    How can I check if week 46 is the last week of an month.

    How can I check if week 47 is the last week of an month.

    How can I check if week 48 is the last week of an month.

    etc.

     

    I also need to know wich week is the last in a quarter.

  6. This is the old page: http://www.thure.nl/...snijden_oud.php I have changed the image to an WOWSlider slideshow: http://www.thure.nl/lasersnijden.php How can I get the text on the left side of my slideshow?

    body{background: url(../images/photo/achtergrond.jpg) no-repeat center center fixed;	-webkit-background-size: cover;	-moz-background-size: cover;	-o-background-size: cover;	background-size: cover;line-height: 25px;text-align: left;font-family: Tahoma, Arial, Helvetica, sans-serif;font-size: 11px;color: #000000;}img {   border: 0px;}#container{width: 960px;height: 720px;margin-top: 25px;margin-left: auto;margin-right: auto;background-color: #f6f6f6;color: #211351;line-height: 130%;border: 3px solid #e0e0e0;	/*--CSS3 Rounded Corners--*/-webkit-border-radius: 10px;-webkit-border-radius: 10px;-moz-border-radius: 10px;-moz-border-radius: 10px;border-radius: 10px;border-radius: 10px;/*--CSS3 Box Shadows--*/-webkit-box-shadow: 0px 0px 15px #000;-moz-box-shadow: 0px 0px 15px #000;box-shadow: 0px 0px 15px #000;}#top{width: 950px;padding: .5em;}#top h1{padding: 0;margin: 0;}#topnav ul{margin-left: 140px;padding:0 5px;font-size:15px;color:#3366cc;overflow:hidden;list-style-type: none;}#topnav ul li{float:left;padding:8px;}#topnav ul li a{text-align: left;font-family: Tahoma, Arial, Helvetica, sans-serif;font-size: 15px;text-decoration: none;color: #999;}#topnav ul li a:hover{color: #e30613;cursor: pointer;}#topnav ul .current a{color: #e30613;}#leftnav{float: left;width: 150px;margin: 0;border-right: 1px solid #e0e0e0;}#leftnav ul{list-style-type: none;text-align: left;}#leftnav ul li a{background: transparent url(../images/list-off.gif) left center no-repeat;padding-left: 8px;text-align: left;font-family: Tahoma, Arial, Helvetica, sans-serif;font-size: 11px;text-decoration: none;color: #999;}#leftnav ul li a:hover{background: transparent url(../images/list-on.gif) left center no-repeat;color: #e30613;}#leftnav ul .current a{background: transparent url(../images/list-on.gif) left center no-repeat;color: #e30613;}#content{margin-left: 160px;width: 800px;height: 535px;overflow: auto;}#footer{float: right;width: 750px;}#leftnav p{margin: 0 0 1em 0;}#content h1{margin: 0 0 .5em 0;color: #211351;}#content h2{margin: 0 0 .5em 0;color: #211351;}#content p{margin: 0 0 1.5em 0;color: #211351;}

    /** generated by WOW Slider 2.8* template Block*/#wowslider-container {zoom: 1;position: relative;left:225px;max-width:314px;margin:0px auto 0px;z-index:90;border:none;}* html #wowslider-container{ width:314px }#wowslider-container .ws_images ul{position:relative;height:auto;left:0;list-style:none;margin:0;padding:0;border-spacing:0;overflow: visible;/*table-layout:fixed;*/}#wowslider-container .ws_images ul li{width:1%;line-height:0; /*opera*/float:left;font-size:0;padding:0 0 0 0 !important;margin:0 0 0 0 !important;}#wowslider-container .ws_images{position: relative;left:0;top:0;width:100%;height:100%;overflow:hidden;}#wowslider-container .ws_images a{width:100%;display:block;color:transparent;}#wowslider-container img{max-width: none !important;}#wowslider-container .ws_images img{width:100%;border:none 0;max-width: none;padding:0;}#wowslider-container a{text-decoration: none;outline: none;border: none;}#wowslider-container  .ws_bullets {font-size: 0px;float: left;position:absolute;z-index:70;}#wowslider-container  .ws_bullets div{position:relative;float:left;}#wowslider-container  a.wsl{display:none;}#wowslider-container .ws_bullets {padding: 10px;}#wowslider-container .ws_bullets a {margin-left: 5px;height: 10px;width: 10px;float: left;border: 1px solid #B8C4CF;color: transparent;text-indent: 0px;background-image:url("data:image/gif;base64,");position:relative;}#wowslider-container .ws_selbull {background-color: #B8C4CF;color: #FFFFFF;}#wowslider-container .ws_bullets a:hover, #wowslider-container .ws_overbull {background-color: #dae9f6;color: #FFFFFF;}#wowslider-container a.ws_next, #wowslider-container a.ws_prev {font-family: Tahoma,Arial,Helvetica;font-size: 14px;position:absolute;display:none;top:50%;margin-top:-15px;line-height:30px;z-index:60;background-color: #000000;color: #FFFFFF;padding: 0px 10px;opacity:0.7;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=70);}#wowslider-container a.ws_next{right:0;}#wowslider-container a.ws_prev {left:0;}* html #wowslider-container a.ws_next,* html #wowslider-container a.ws_prev{display:block}#wowslider-container:hover a.ws_next, #wowslider-container:hover a.ws_prev {display:block}/* bottom center */#wowslider-container  .ws_bullets {bottom:0;left:50%;}#wowslider-container  .ws_bullets div{left:-50%;}#wowslider-container .ws-title{position: absolute;bottom:0;left: 0;margin-right:5px;z-index: 50;background-color:#000000;color:#FFFFFF;padding:10px 1%;width:98%;font-family: Tahoma,Arial,Helvetica;font-size: 14px;opacity:0.55;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=55);}#wowslider-container .ws-title div{padding-top:5px;font-size: 12px;}#wowslider-container .ws_images ul{animation: wsBasic 12s infinite;-moz-animation: wsBasic 12s infinite;-webkit-animation: wsBasic 12s infinite;}@keyframes wsBasic{0%{left:-0%} 16.67%{left:-0%} 33.33%{left:-100%} 50%{left:-100%} 66.67%{left:-200%} 83.33%{left:-200%} }@-moz-keyframes wsBasic{0%{left:-0%} 16.67%{left:-0%} 33.33%{left:-100%} 50%{left:-100%} 66.67%{left:-200%} 83.33%{left:-200%} }@-webkit-keyframes wsBasic{0%{left:-0%} 16.67%{left:-0%} 33.33%{left:-100%} 50%{left:-100%} 66.67%{left:-200%} 83.33%{left:-200%} }#wowslider-container .ws_bullets  a img{text-indent:0;display:block;bottom:12px;left:-32px;visibility:hidden;position:absolute;	border: 2px solid #B8C4CF;max-width:none;}#wowslider-container .ws_bullets a:hover img{visibility:visible;}#wowslider-container .ws_bulframe div div{height:48px;overflow:visible;position:relative;}#wowslider-container .ws_bulframe div {left:0;overflow:hidden;position:relative;background-color:#B8C4CF;width:64px;}#wowslider-container  .ws_bullets .ws_bulframe{display:none;bottom:25px;overflow:visible;position:absolute;cursor:pointer;	border: 2px solid #B8C4CF;}#wowslider-container .ws_bulframe span{position:absolute;}

×
×
  • Create New...