Categories
Mastering Development

Data from main table does not populate the input date field of a modal form

Data in input date field(called ITEnterDate) of a modal form is not showing, although data in all the other fields is populating. If I make the field in the modal an input text then data shows. Although, it has to be an input date so that user can select from a date picker type of […]

Categories
Mastering Development

How to use AJAX to get value form controller into a popup

I want to get data from a controller and display it in a html pop-up when a button is clicked. At this point the POPUP is showing when the button is clicked but the data isn’t loaded At this point I need that onclick the values get loaded and show them in the popup. index.blade.php […]

Categories
Mastering Development

Get konva object X, Y not the pointerPosition after dragging

I’m using konvajs to create boxes and can be dragged and save the x,y coordinates after double click into the database via ajax, here is the code: layer.on(‘dblclick’,’Group’,function(evt){ var shape = evt.target; var bin_code = shape.name(); var minibox = stage.findOne(‘#mbx_’ + bin_code); var group = stage.findOne(‘#grp_’+ bin_code); $.ajax({ url: ‘/iwms/_update_bin_coord’, type: ‘POST’, dataType: ‘json’, data: […]

Categories
Mastering Development

Get data from controller and show it via AJAX

I want to get data from a controller and display it in a html pop-up when a button is clicked. At this point the POPUP is showing when the button is clicked but the data isn’t loaded At this point I need that onclick the values get loaded and show them in the popup. index.blade.php […]

Categories
Mastering Development

How do I structure my code correctly and still be able to use my $(this) var’s?

Having problem with upload script when using it multiple times it POST more than one at a time. I figured out I’ts becouse I have nestled events, now if I dont do this I cant use VAR’s that is set from the first click event. How do I structure the code in such way that […]

Categories
CMS Mastering Development Wordpress

$ is not defined

I am learning WordPress and I am working on the contact us form. I am using jQuery validation. I am using the below code. function contact($atts){ $html='<form name="invite" id="contactform" class="contactform" method="post" action=""> <div class="row"> <div class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-xs-12"> <div class="form-group pb-3"> <label>Your email address</label> <input name="email" placeholder="your.email@gmail.com" type="email" class="form-control customInput" /> </div> </div> […]

Categories
Mastering Development

how to receive data from flask to jquery?

I am trying to read the data from one of the flask end point to the jquery as follows <script> $(function() { $("#generate_transaction").click(function(){ $.ajax({ url:"/new/transaction", type:"POST", dataType: ‘json’, headers: {‘Access-Control-Allow-Origin’: ‘*’}, data:$(‘#transaction_form’).serialize(), success: function(response){ //setting the Amount field empty document.getElementById(‘Amount’).value = ” }, error: function(error){ console.log(error); } }); }); }); </script> Here ‘#generate_transaction’ is the […]

Categories
Mastering Development

Populated Dropdown list when radio Button is checked using Jquery & Ajax on Laravel

Hello friends i get stuck when i want to create drop down menu based on checked radio button, No error and nothing happen here, whats wrong with my code ? this is the code <fieldset class="form-group"> <div class="row"> <label>Jenis Kegiatan : </label> <div class="col-sm-10"> <?php $no=1; ?> @foreach ($jkData as $jk => $val) <div class="form-check"> […]

Categories
Mastering Development

Flask session not passing to different function

I have two functions: @app.route(‘/firstfunc’, methods = [‘POST’]) def firstfunc(): session[‘final_box’] = 10 session.modified = True return jsonify("success") return jsonify("error") @app.route(‘/secondfunc’, methods = [‘GET’,’POST’]) def secondfunc(): if request.method == ‘POST’: final_boxx = session[‘final_box’] print("VALUE———————–>>>>>>", session[‘final_box’]) return render_template(‘some.html’, final_boxx = final_boxx) The AJAX CALL: $.ajax({ type: "POST", cache: false, data:{data:annotation_Jsonstringify,image_height:realHeight,image_width:realWidth,image_name:filename}, url: "/firstfunc", dataType: "json", success: function(data) […]

Categories
CMS Mastering Development Wordpress

My function containing a mysql query launched by ajax is not working in wordpress. What am I missing?

I am trying to insert rows into a table I’ve set up based on user’s answers. I have made a child theme and a custom template for the page with the form. My issue is that I have no way of knowing what’s going wrong where and why the data isn’t being inserted. my js […]