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
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
CMS Mastering Development Wordpress

Ajax sometimes work and sometimes just don’t work

So ive create load more posts using ajax following tutorial i found online. At first it works when there’s just one button and so i create another one, and it works at first try but when i try again it just stopped working. I’m trying to just randomly edit the ajax or something that related […]

Categories
Mastering Development

Object’s collection being nulled on post in Razor Pages after having been set successfully through Ajax call

I am trying to add items dynamically to an object’s list property using Razor Pages. I can successfully add one item to the list but when I try to add another item it loses the binding and says that the list property is null. The rest of the form has regular string and int properties […]

Categories
Mastering Development

Ajax function inside a second Success function is not being called

I am working with DataTables library where i need to make consecutive AJAX requests. Problem is that the AJAX function inside the second Success function is not being called. Here is the whole code $(document).ready(()=>{ $.ajax({ url: ‘http://localhost:3000/api/post/getUserData’, method: ‘post’, dataType: ‘json’, data: { "email": window.email, "token": window.token }, success: function(data){ // <———————–FIRST SUCCESS FUNCTION […]

Categories
CMS Mastering Development Wordpress

custom post query with ajax or some other option to refresh posts based on user selecting from dropdown menus on page

I have a page that lists all custom posts of type "the-talent". I have three Dropdowns each with a custom taxonomy (level, location, and specialty). I have a on-click function that grabs the selected values from the dropdown. Each time someone makes a selection I’d like to run a new query with those inputs. Ideally […]

Categories
CMS Mastering Development Wordpress

custom post query with ajax or some other option to refresh posts based on user selecting from dropdown menus on page

I have a page that lists all custom posts of type "the-talent". I have three Dropdowns each with a custom taxonomy (level, location, and specialty). I have a on-click function that grabs the selected values from the dropdown. Each time someone makes a selection I’d like to run a new query with those inputs. Ideally […]

Categories
Mastering Development

How to Get data in text field dynamically, based on selected dropdown list

I want to get the value of input field dynamically based on previously selected dropdown list. Now in the input box I get some html tags along with the desired value.How can i get only the desired value without the html tags. The following code contain a dynamic dropdown which works perfectly, but the input […]

Categories
CMS Mastering Development Wordpress

How to submit the date with ajax?

I have been trying to create an appointment form. Everything else is working but I am not able to submit the date. Here is my code: My HTML for the date field: <input type="date" name="aptdate" class="form-control rounded-pill mr-sm-2" id="aptdate" placeholder="Select a date" onfocus="(this.type=’date’)" onblur="(this.type=’text’)"> My JQuery: jQuery(document).ready(function ($) { /* contact form submission */ $(‘#aptForm’).on(‘submit’, […]

Categories
CMS Mastering Development Wordpress

wp_verify_nonce not working on the mobile device

I am using a very simple form request to and verify it through the wp_verify_nonce() function. It is working perfectly on the desktop. But not working on mobile devices( iPhone, Andriod ). Could someone help me to identify the issue? HTML Code <form action="" method="POST" id="test-form" novalidate="novalidate"> <?php wp_nonce_field( ‘irw_gzip_action’, ‘irw_gzip_field’ ); ?> </form> JavaScript […]