All Questions
77 questions
0
votes
1
answer
57
views
Updating URL on ajax call
Trying to update url whenever the button for modal to show content is clicked, managed to find out how to change it but it returns http://localhost:3000/wp-admin/admin-ajax.php
which is not what I ...
0
votes
1
answer
27
views
How to make added element by jQuery knows recent functions
I have an html table each row (tr) have a value (exp: 200$) and a delete button, how to make
each added row knows recent functions without recall them every time
$(function () {
$('.add-prod').on(&...
-2
votes
1
answer
49
views
I would like to get useful link at the end with jquery
At the end would like to get this: mondaysoupcall.html and call into another div.
This is the target div:
<div class="description"></div>
This is the label where I want to click and read ...
1
vote
1
answer
113
views
Problem: pass some parameters in ajax call (post)
I have 2 functions: one to add and another to delete. I would like to reuse the same ajax call to send the parameters that are added or deleted. How can I optimize my function?
Here is my code at the ...
0
votes
1
answer
71
views
javascript call a function from another
I have this JS function:
function addMemberToLessonDirect(id)
{
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
...
-2
votes
2
answers
214
views
On event JavaScript
I need to create landing page where you need to enter promotion code to proceed. There are 3 different actions: you enter correct code and redirected to another page, you have entered wrong code and ...
0
votes
1
answer
51
views
AJAX call passes the <div> instead of the <button> one
I'm wondering why this ajax call, passes the div id instead of the button one that I want to.
<?php
while($info = mysqli_fetch_array($sql))
{
echo "&...
0
votes
1
answer
27
views
How to use jquery and javascript in same document
So I am trying to use jQuery, (in the heading) and javascript (normally) in the same document, but it seems that because of the script source thing, it conflicts with the JavaScript and doesn't word ...
1
vote
1
answer
73
views
Wrong data received in javaScript using AJAX
I made multi calls AJAX in my file.js, the calls have the next form:
file.js
$.post('functions.php',{consulta: 'tbl_Cours', action: {"ask_query_field":variable1}).val()}, function(res1){
if (res1)...
1
vote
3
answers
123
views
Why would I use the call() method in this case?
So I am kind of having a hard time understanding when the appropriate time to use the call() method would be.
I found this example online:
var person1 = { name: 'Chris' };
var sayName = function() { ...
0
votes
1
answer
1k
views
JavaScript: Issue with single quotes and URL
I have the following JS coding:
var myVariable = "material'"; //<- there is a single quote before the double quote!
var object = {
path: "/Data(Material='" + myVariable + "')"
}
object.path is ...
0
votes
1
answer
413
views
Understanding callback.call function in jquery
Please go through the below code.
I am not able to exactly what's calllback.call is doing.
Also, I am not able to know what is the difference between this and this[i] and how if(callback.call(this, ...
0
votes
3
answers
2k
views
Can't call JavaScript Function from JQuery
I am trying to call my JavaScript Function from my jQuery Function, but it does not seem to be calling the function showMain() at the end of the jQuery.
See below: I am trying to Call the showMain() ...
-1
votes
2
answers
211
views
multiple GetJSON calls not working?
I have some code that runs like this, and it works as intended.
<script>
$.getJSON(url1, function (data1) {
$.getJSON(url2, function (data2) {
$.getJSON(url3, function (data3) {
...
0
votes
1
answer
2k
views
How to call backend code from frontend script
This script reads QR code and stores the resulting string in txtcodigo.
Upon clicking the textbox (or pressing enter), msgSalida is called.
But this needs to be automatic - it should not require a ...