Need help with jQuery
I'm new with jQuery and Javascript. I had downloaded the jQuery v3.4.1 to my PC in same folder with .html page. I'm traying to embedd jQuery in .html page with <script> but it doesnt work. When i load/reload the page the alert() outputs "jQuery not installed". Hope someone can help me here. <html> <head> <script src="jquery.min.js"></script> </head> <body> <div id="body-wrapper"> <script> if (typeof jQuery == "undefined") {
Alert box not working
Hi, I have a simple JS file, and only 1 text box, if the text value is PIN, show an alert. Can someone please point where I am wrong? https://jsfiddle.net/fymno1ea/1/
Why wont this simple piece of code work on mobile browsers on a Wordpress website
<code> topicHighlight(); function topicHighlight() { jQuery(document).ready(function ($) { $(".series-item-text [href]").each(function () { if (this.href.split("?")[0] == window.location.href.split("?")[0]) { $(this).addClass("active"); } }); }); jQuery(document).ready(function ($) { $(".series-item-link [href]").each(function () { if (this.href.split("?")[0] == window.location.href.split("?")[0]) { $(this).addClass("hide");
How do I check and update an array of JSON objects
hi guys I am trying to create a shopping basket in a JSON array and an array to be stored in the localStorage. I want to 1. Check if exists 2. Update the array based on ProductID 3. If it does not exist then add new values to the array 4. Then update the localstorage. Currently my code does not update e.g. 1 + 1 is 11 instead of 2. What am i doing wrong SEcondly the array appears to be sub arrays instead of updating it var Basket = { ProductID: product, Quantity: quantity }; // create shopping
how filter by date
hello i have select for exemple more recent ,older,precise period if I select more recent i display the most recent dates I managed to display by video or picture this my code https://jsfiddle.net/thomas_david88/3y5veh6u/3/
full calendar update : not getting id of inserted event
Dear Sir/Madam Pls refer http://prajaktasoftware.com/vaibhavtravels/php-calendar-event-management-using-fullcalendar-javascript-library/ in this program when i insert a new event by double clicking the calendar cell I am not getting its id (new id) of the inserted event as a result i cannot edit / delete this newly inserted event ----------------------------------------------------------------------------------------- $.ajax({ url: 'add-event.php', data:
Getting ID of selected Table Cell
Hello! I was wondering if anyone would be able to help me with an issue I am having. I have a "custom" Color picker on one of my forms. It is just a table with td cell background a certain color. When the user clicks on a td, it highlights as the selected color. What i need to do is get the id of the table cell that has been clicked and and set a hidden inputs value to that id value, so that when I check to see which "color" was selected, I can just reference the td ID. So far I have: $('td').on("click",
Database to maintain data
Dear Sir I located calendar Jquery http://prajaktasoftware.com/vaibhavtravels/calendar.html suitable for me to use for my project i found event code as follow: pls help me to know 1. Is this JSON code in case of update / Add 2. I need to update/Add to Database and the create this JSOn code from database again so as to maintain update status of the calender --------------------------------------------------------------------------------------- events: [{ _id: 1, title: 'Michigan
how to change text dynamically svg
hello i have structure <g node-id="itemdat-1" style="opacity: 1" transform="matrix(1,0,0,1,-170,115)" class="node" level="1"><rect x="0" y="0" height="55" width="150" fill="#039BE5" stroke-width="1" stroke="#aeaeae" rx="5" ry="5"></rect><text width="230" class="field_0" style="font-size: 18px;" fill="#ffffff" x="75" y="35" text-anchor="middle">Module 1</text><g data-edit-id-filed="itemdat-1" transform="matrix(1,0,0,1,130,5)">I want to change the text in balise <text> I searched on the net but I didn't
How to use a callback in Ajax
Been struggling to understand the docs for this for 24 hours. Unable to resolve it. Posted elsewhere with no luck. In fact the code I got provided caused the alert to loop continuously (maybe because the function is called when the page loads?). I am trying to find out if a text file (note) exists on the server. I want to return "yes" if it does, "no" if it does not. I am able to get this into an alert successfully (for each of the 7 occurrences) but I want to return it back into the originating
make jquery value available in php
hello, im quite new to jquery so i guess my questions are beginners questions. I have a piece of jquery for getting the value of a slide button with html range. I want the output in php available. But for me it is not clear how jquery sets the output of the range slider in a variable? And I also dont know how to post (like html $_POST) this variable to the php server? what steps should I follow to get the value in a 'default' piece of code ? code: <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
how to use split with two different inputs
i have any question, like me there are two inputs 1. no_po = BMM / TRX001 2. no_po = BMM-RF-1 this is what I use 1. the code I take by using split or splitting data in two and I take it in the first array, 2. how can I get the second number from the second no_po or the second array View <div class="form-group row"> <label class="col-lg-4 col-form-label" for="reference_code">Nomor PO<span class="text-danger">*</span></label> <div class="col-lg-6"> <select name="reference_code" class="form-control"
how to append json in under json
hello I have succeeded in creating JSON module.data = data; var namodule = name; var nameofmodule = { "id":id, "namodule": namodule, "pid":pid } module.data.push(nameofmodule); console.log(module); but it's just missing {{formation, Module1, Cours1, Chaiptre1]) this my code jsfiddle.net/jaafar/ahk4xpmb/203 in the final i want this {id: "4", namodule: "Module 1", pid: "1",i d: "7", namcours: "Cours 1 ", pid: "4 ,id: "10", namodule: " Chaiptre 1", pid: "7"} you will find attached here also diagram
jspdf autotable blank cell
i m using jsPDF auto table plugin i need to set null in the cell while printing on pdf where html table contain   here is code but its not inserting null <script> function generate() { var doc = new jsPDF('l', 'mm', "a4"); var res = doc.autoTableHtmlToJson(document.getElementById("printJS-form")); // doc.autoTable(res.columns, res.data, { margin: { top: 80 } }); var header = function (data) { //doc.setFontSize(10);
problem with animate() and " + "
Hi folks, I'm trying to consolidate a lot of individual functions which scroll the content of a div. Here's an example: $('#updown').animate( {marginTop:'-40rem'}, 2000); I've tried several versions of function upIt(n,t) { $("#updown").animate( {"marginTop:" + " 'n' " "rem"}, "t"); } but get error messages about "+". What am I missing ? cheers.
move item with specific element drag and drop jquery
hello I have list on the left , when I drag element it must be moved to element matches my example https://jsfiddle.net/jaafar/9xvj67bd/42/
Appending using formData.append returns undefined
hi guys I am uploading an image using formdata append, which works well How do I append extra values from a textbox or hidden field ? Here is my code, which returns undefined function AjaxUploader(input) { var formData = new FormData(); formData.append('file', input.files[0]); /// This works var token = $('#__RequestVerificationToken').val(); formData.append('__RequestVerificationToken', token); /// this returns undefined ,
How to Load an external jQuery File
I am trying to learn how to create my own external jQuery file to create a table. I found some code which looks good and have found out how to create the external file. I have added it to the head of the html page under the line that adds jQuery. Like this: <script src="../js/jquery-3.4.1.min.js"></script> <script src="../js/my_table.js"></script> I get no errors in the console. I believe I can add some code to the head to call it on (document).ready and then add a div to the page. All my efforts
Uncaught TypeError: $(..id is not a function - Cannot change the ID of an element
I am trying to change the id of a div at runtime, but getting the error. Its a aspnet core program, so the @1 value is a dynamic value that translates to an integer value e.g. 1 Uncaught TypeError: $(...).parent(...).closest(...).id is not a function My code is $("#hi").attr('id', @i); in my added scripts I have <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha384-xBuQakNTNrHIW2I5f" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
Problem with while loop
Hello friends, im a noob with a problem mabe a hero can help. i have tried something and now i found a problem which i cant solve. in the code are a var number of buttons which should show different divs (which was hide at the beginning) depend on the class. The problem is the first while is working but the second one not. It execute just the last loop. Why? and how can i solve this? This is my code: <script type="application/javascript"> $(document).ready(function (){ var i = 0; while (i < 10){
a problem in jquery for select list
here's my html: ---------------------------------------------------------------- <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>M3</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script type="text/javascript"> function listChange(selectObj) { var type = "1"; $("select[name = 'f04']").parent().parent().find("select[name='f05']
Problem Populating Drop-Down on Hover Event
Hi, I am *very* new to JavaScript and jQuery and programming in general. I have a drop-down that gets populated, on a hover event, from a list of jpg files in a directory on the server and adds them to the drop-down list. This works well but the page has to be refreshed when files are deleted or added to the directory, to view them in the drop-down. Someone has very kindly been helping me to try and make this dynamic, so hovering over the drop-down will update the list. But the script does not appear
if else
Hello, we have a click event, we need a class to be added after clicking and hover events change. Explain why if I click on event click I set the condition if else the verification does not work for me https://jsfiddle.net/wp2tLnfy/1/ , but the code works only https://jsfiddle.net/wp2tLnfy/
Get value inside a string
I can take from within an array a string that refers to a table row that has some columns, and assigned it to a variable. How do I access this variable and get the value of a column cell defined by a class? Example: // Access var $ ws_cell_in and get column value ? $ws_cell_in = $ws_array_row [ $ws_index_in ];
Document.Ready seems to contradict my scripts
hi guys I am trying to make my web page friendly, but it appears it seems to be contradicting itself. Here is my code below ( full webpage can be seen here https://www.dropbox.com/s/cgd7tkds5kq73v8/ehi.html?dl=0 ) It seems line 4 and 5 are disallowing lines 26 and 27 As I want to show a loading gif when the users records are being updated, but it fails $(document).ready(function () { $('#Main').show(); $('#Wait').hide(); $('#Add_Submit').on("click",
Problem: Array Dinamic
My goal is to insert data into an html table list according to the number of events on the button, so far so good. The problem is when the event happens for the second time and too many times it duplicates the row getting a total of 3 in the table and if the event happens a third time it prints 3 more times totaling 6? Click to view interaction... $(document).ready(function() { // var $ws_row_zero = 0; // atribui array vazia a uma variavel : $ws_array_row = []; // $(".btn_row_add").click(function()
DateTime in a format that I can upload to MS Sql Server
function getSQLDate() { var dt = new Date(); var dtstring = dt.getFullYear() + '-' + pad(dt.getMonth() + 1, 2) + '-' + pad(dt.getDate(), 2); return dtstring; } The above function provides me Date in a format that I can upload to MS Sql Server. But this succeeds only for the date part. If I extend the function (as below) to include "time", the data is not saved. function getSQLDate() { var dt = new Date(); var dtstring = dt.getFullYear()
math.random returns last function in array
Hi, strictly this is a javascript question, but am posting here because the functions involved use jQuery. I've made a function which is supposed to return a randomly-selected function from an array of five. I've been testing by changing the order in the array, clearing cache, using different browsers, but I'm always getting the last function in the array. "Always" meaning ten iterations of clearing cache and histpry, and trying again. function jun12() {startEm('june12','welcome12')} function jul01()
Sending picture & data to DB
Hello, Little difficulte to explain my problem... Ok I have a form with inputs and image upload. I have two object JSON One with the image converted to Base64 then converted to JSON string One with all the other inputs. Now I want to send it to my controller and DB. But I totally don't succeed. This is a github link to check the HTML and controllers also a screenshot of DB diagram The main problem is when I want to send the picture I need the RecipeID (int AddRecipe) but how can I get it to add it
command keeps repeating n Number of times
Hi, I am new to this forum and Jquery. I need help with this code I have two tables table1 on the left and SelStudent on the right. table1 has checkbox on each row which when clicked fires the function below. My problem is when I click a checkbox on any row in table1, 1 record is appended to SelStudent Table $("#SelStudent").append(ttext); runs once, as expected) when I click another checkbox in any row of table1, 2 records are appended to SelStudent table $("#SelStudent").append(ttext);
jQuery find function with escape characters not working in latest version
I have a selector in a find function that works with jQuery 3.3.1 and before that doesn't in 3.4.0 and 3.4.1. I am using it on an xhtml jQuery document object that I have used $.parseXML on. I am using the full version of jQuery. I have looked into the jQuery changelogs and see nothing that should affect this, as well as in the source changes on github. I have tested the find with .class and #id and it works, but the IDs will be dynamic so I need to search by attribute name. There will also be multiple
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience
how can browser console log warning : "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience" ? My jquery version /*! * jQuery JavaScript Library v3.4.1 My ajax script $.ajax({ url: '$url', type: 'post', // dataType: 'json', // data: data, }) .done(function(response) { $("#inject").html(response); }) .fail(function(xhr) { console.log(xhr); });
Problems Using Ajax to update DB
So here is the ajax code located in the startPublishing() function: streamId = randomToken $.ajax({ type: "POST", url: "connUpdate.php", data: 'stream=' +streamId, success: function(response) { alert("Record updated"); } }); here is connUpdate.php <?php // Create connection $link = mysqli_connect("localhost",
Get values from several inputs&select
Hello jQ-People, I'm new in jQuery and for my study i want to make a webapp that send to DB BBQ recipe by a from. Client goal: Complete form to creat a BBQ recipe ! Client need to: add ingredient name (input)+ Measure (input) + unity of measure (select) Client can: add several line of ingredient, each line is 1 ingredient My problem: I want to get in an array (for exemple) each line of ingredient like Arr [ "Apple", "3", "Kg" "Beef", "500", "gr" .... ] My goal send the objet to the database. I have
Mouseenter firing multiple times
I'm trying to get a random image to appear on each new hover of a div. The images are coming from some JSON data. It's currently working, but the mouseenter function is firing when the mouse is still inside the div. Maybe the getJSON request is working each time the image is delivered? Is it possible to store the JSON data in an array, and access that array each time mouse enters? Any advice would be much appreciated :) My jQuery code looks like this: $('#imagehover').on('mouseenter', function()
help with image
Tìm hiểu về tương lai của tiền điện tử Tiền điện tử là một loại tiền tệ hiện đại, dù mới xuất hiện nhưng đã thu hút nhiều sự quan tâm của người tiêu dùng và giới chuyên gia tiền tệ. Tương lai của loại tiền này như thế nào vẫn còn là một dấu hỏi. Bài viết sẽ cung cấp một góc nhìn về tương lai của tiền điện tử. Tương lai của tiền điện tử như thế nào là vấn đề được nhiều người quan tâm. Mục đích ra đời của tiền điện tử Tiền điện tử hay tiền ảo là một loại tiền tệ hiện đại, được quản lý hoàn toàn dựa
Getting data from a range of values
I'm trying to get a range of numbers depending on what the user inputs. I have customer.js which has the customer name and shoe size and what I would like is to get a range of shoe sizes depending on what the user puts in. For example. A user puts in the first textbox 5 and in the second textbox 9 I want the customers that is between 5 and 9, but also including 5 and 9 to be displayed. I've only gotten as far as this. my html <form id="shoe_size"> <label for="size">Enter sizes</label> <input
Can't Hide a Div on (document).ready
Hello, I'm using the Tableau JavaScript API to toggle between two dashboards. The two buttons on the page I have work fine to do this, as they are just showing and hiding some divs that the dashboards are in. The problem I'm having is hiding one of the dashboards when the page loads. I have a feeling its a timing issue, but not sure what the problem is, Help appreciated! <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
Display Details like lightBox
Dear Sir/Madam pls refer http://prajaktasoftware.com/dashboard/enquirysearch.php Green button Reminder List we get popup and small div inside This part is working the way I want however when we scroll down the dark background and the pop div also get scrolled. I want their position fixed html <!--- DIV with dark back ground --> <div class="popbg" id="mainbgdiv" > </div> <!--- DIV with Data --> <div class="popdata" id="insidediv"> </div> css /*--------------------Center DIV--------------*/ html,body{height:100%;}
Use jquery variable as part of html link
Dear sir / madam var mob1=$(''#mob1').val(); var url= "mobilememberidfill.php"; data = { mob1: mob1 } $('# mobilememberiddiv').load(url,data,checkmobileexists) ; Above ajax gets me ID of the mobile number stored in DIV with id mobilememberiddiv in this case, (when mobile number exists), i get its ID from var id = $('# mobilememberiddiv').text(); and in this case i want to display message $('#mobilemessagediv').html("Mobile Number Exists!! <br> <a href='payfees.php?id=ID'' > Cilck to make
Next Page