Concatenate variables with Json keys.
Hi everyone, I would like to ask for some help if you can. I hope I'm explaining myself well. :-) I have a json file with some data inside. I load it via ajax. I retrieve the key via this path. concatenate = JsonData.change_this.title console.log(concatenate)It works and returns the title to me. Now what I'd like to do is change "change_this" to something dynamic. What I tried is the following: new_change_this = "change_this_2"; concatenate = JsonData.new_change_this.title console.log(concatenate)
Jquery Scroll full screen div
I am using this function which works ok for one screen size. jQuery(window).scroll(function(){ if (jQuery(this).scrollTop() > 1400) { jQuery('.conmenic').addClass('menu-invert'); } else { jQuery('.conmenic').removeClass('menu-invert'); } }); The problem is that I have a full screen background div which is set in my css as follows: #fullimg {height: 100vh;} I need to somehow calculate for all screen sizes that the user has fully scrolled after the #fullimg before adding/removing
Order the posts
Hello everybody, I had a look in jQuery UI forum, and the first posts displayed dated one year ago. So I came to a question : there are numerous ways to filter the lists of posts in a forum, and that is nice, but are there any ways to order them? And is there a way to know how the list is ordered ?
jQuery update causes unrecognized expression error
I am trying to update my jQuery version from 1.10.2 to 3.6.0. When I use the 3.6.0 version, I get the following error - "Uncaught Error: Syntax error, unrecognized expression: a[href$=]" Even when location.hash has a value, it gives the same error. For example, page.html#ceftin will give the error with a[href$=ceftin] listed in the error. This does not occur with version 1.10.2. Here is the script where the error occurs: $(document).ready(function(){ var anchor_hash = location.hash; var anchor_link
Questions Re: multiple INSERT statements to server PHP I have some questions regarding coding of multiple INSERT statements going to my server.
I have some questions regarding coding of multiple INSERT statements going to my server. My code is based on an example I found in fiddle. Here is the code and my questions in bold. I'm trying to learn how this all works so any hints, explanations will be appreciated!! Code below will run. PHP Code: <?php // Fri May 28, 2021 14:30 // multiAdd.php // to serve multiInsert.html set_include_path( '../include' ); error_reporting (E_ALL ^ E_NOTICE); print_r($_POST); echo json_encode($_POST); // Returns
como enviar mais de 2 array para controlador php usando ajax
pessoal boa tarde! estou com o seguinte problema: explico:.. meu formulário tem 3 arrays - cabeçalho = onde estou serializando - array produtos = Produtos da Venda (código, EAN, Descrição, Qtde e Valor) este array ja esta criado e com dados armazenados, seu HTML é criado dinamicamente ao clicar no botão VISUALIZAR - array Contas a Receber = Duplicatas a serem cobradas ao gravar a VENDA. a duvida é, como enviar estes 3 array para Front-End ( PHP )... e la validar e GRAVAR NO BANCO.
should we declare var in side $.each or loops or immedialy above them
hi, I heard that variables must be declared above the loop to avoid the declaration cost specially in sql server. so here in jquery i noticed people declaring variables in side the loop lik e$.each or foreach loops . q1) is it good practice? yours sincerely
Select2 - make color for combobox
Hi After selection element in Select2 i send data to server and check if its ok! After check if result ok i want to make green border for combobox. How its possible to do? Thanks a lot https://jsfiddle.net/urtdr/epjsf3vx/11/
Auto Complete not working
Dear Sir Pls refer http://webvikas.net.in/familytree/indexadmin.php I am unable to search and i checked debugg console no error is displayed my coding <script type="text/javascript"> $(document).ready(function() { $('#searchid').change(function(){ //fire your ajax call var id = $('#searchid').val(); window.open('https://adventchembio.com/msds.php?id=&&product='+id); }); $(function() { $("#searchname").autocomplete({ source: "marathesearchfill.php", minLength: 2, select: function(event,
How can I prevent "enter" after on change
Hi people, I have a input with a "on change" and a delete button with "on click" in one row. When the user try to enter in the input the delete button will activate. How can I prevent this?
new elements not be listener
Hi, if the main html page contains: ..... $( ".abc" ).on('click',function() { console.log('a'); }); .... If used Ajax to get multiple buttons with a class 'abc' and added the button to my html page by .html() now the buttons are not listener and if clicked not do the console.log, because it was not available when the page loads,how to solve this? and whats license of contents of this forum? are all codes are under public domain also from the forum? Thanks
Add Multiple Row In A Table and Sub Row
With jQuery, most of the time we add rows one by one in a table or delete them. But in my case, the requirement is bit different. Say I've a table and have to add new row and tested the below: HTML: <button class="addRow"> Add New Row </button> <table> <thead> <tr> <th>Rows</th> </tr> </thead> <tbody> <tr> <td>Row 0</td> </tr> </tbody> </table> Script: <script> var lineNo = 1; var html = ""; $(document).ready(function () { $(".addRow").click(function () { html = "<tr><td>Row" + lineNo + "</td></tr>";
How to use HTML Forms inside <script> tags or in a function()
I have a select options box to choose a query. Select All, Select by State etc. I have one choice which requires further input - Search by Partial Name. Is there a way to do this by having a <form> show up inside a script or function. I would then use $("#partname").on('click'. function() { put form in here and use input.val() to get the value to Return}. Summary: One choice can use AJAX directly to get info from Database. Another choice requires further input before using AJAX
can i declare define funtions in document.ready and use them at more than few places.
hi, Q1) should i define and declare this function inside the docuent.ready or outside. i do not need this x2() function any where else , i need it inside only. $(document).ready(function () { function x2 () { alert("abc"); } $('#ddlcomp).change(function (event) { x2 (); }); $('#ddlcust').change(function (event) { x2 (); }); });
how to add css class to check dynamically
Hi, I am trying to add CSS class to a disabled checkbox when clicking a button. Here is the code, but it doesn't work, please help. <style> .input[type="checkbox"]:disabled + label{ outline:5px solid red; background-color:red; } </style> <script> .input[type="checkbox"]:disabled + label{ outline:5px solid red; background-color:red; } </script>
Show Data With Previous and Next Button Using jQuery
I am working on a project where I've to show data using **Next** and **Previous** button clicked accordingly. My requirement is something like this: (By default, data will be loaded from database and will be rendered as follows) 1 1.1 Clicking on next button, it should render the following and vice-versa: 2 2.1 2.2 I did few researches and got one that worked perfectly but unfortunately it didn't work as expected because it simply works on individual div as below: <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
Selecting correct radio button using jQuery
I have 4 radio buttons and a data table that has a row that matches each radio button value. When I select a data table row the corresponding radio button is selected. I can cycle through all data table rows and watch each corresponding radio button get selected. If I select a data table row that has the same radio button value of a previously selected row or go back and re-select a row, the radio buttons stop being selected. Can someone tell/show me why my radio buttons are not being selected the
How to compare two arrays and get index in the form of an array?
Here are two arrays: arrayOne = [a, b, d, g, k] arrayTwo = [a, b, c, d, e, f, g, h, i, j, k] Since these two arrays have some elements in common, I want to get the index of [a, b, d, g, k] in arrayTwo, and then put those index to an array. Is there any way to do it?
what is the precedence of datatype while comparison.
hi when i compair in javascript like so , then it converts one type to another type. which is based on precedence. can i get link of that precedence. if ("2"<3) { }
is it possible to disable allcontrols of the form except the one has focus.
hi, i want to disable all the elements except the text box whose entry is wrong. ,the problem is, when ever some one enters wrong txt in textbox , i set the focus to the element , i do not want the user to click any other control unless her corrects the entry which is mandatory.
how to find the funciton of jquery are cross browser compitable or not.
hi, i have used this line $(selector).parent().parent(); I want to know that how many browsers support it. note: the html properties used by java scripts browser compatibility is at MDN. but my question is about the function of j query.
is there any website or library which checks runtime errors or cross browser errors.
hi, is there any website or library exists which can tel me that this property or function would not run on particular browser. and at least if it could tel the runtime errors ?
how to cancle click event of a button, which executes after lostfocus of textbox element.
hi, I have a textbox and a button, with this I have written a focusout event of textbox which calls a function which returns true or false. and I have written one click event of the button. now I want to cancel the click event of the button if the function which is called in focusout returns false else it should follow the natural chain of events. and the problem is worse because I have many buttons and checkboxes which have got click events or other events too. so I want to find the next event
Merge JS files into one
Hi We use a lot of Jquery plugins and own JS scripts on out website. I am serching simple solution for merging all files into one file. What can you recommend? Thanks a lot
documentation of order of event of dom
i used change event of textbox and found the change , then blur and then focusout fires in an order, so i wanted to know all set of orders of events which exist and fires in Dom. so pls send me link of that domcumentaiton.
image preloading -- advice neeed
Hi, I have a page which features fifty small ( < 10KB) images. They need to all be available to a script which makes them visible according to class. Any recommendations about jQ plugins, or the best way?... maybe this, in the head of the page? $(window).load( function(){ $.preloadImages = function() { for (var i = 0; i < arguments.length; i++) { $("<img />").attr("src", arguments[i]); } $.preloadImages("folder1/img1.jpg",// "folder1/img50.jpg"); }; });
event handling
Hi @all, im new to jquery - fourth day - n searching for a function which allows me to start different actions by multiple clicks. Code until yet is this: <script> $(document).ready(function(){ $("#button_toggle").click(function(){ $("div").toggleClass("toggle_black"); if (document.getElementById('eins').innerHTML === "Dies ist ein Paragraph") $("#eins").text($("#eins").text() + " im dark-mode"); if (document.getElementById('zwei').innerHTML
jQuery get json with nested arrays
Hi, I'm trying to access the following json data: The script that I'm attempting to use: var chart = new ApexCharts(document.querySelector("#chart2"), options); chart.render(); $.getJSON('url', function(data) { jQuery.each(data.results.events.dataUpdates, function (i, result) { chartdata[i] = []; chartdata[i]['text'] = result['date']; chartdata[i]['text'] = result['old']; chart.updateSeries([{ name: 'Sales',
windows.location is copying the old path with new one
I have a page login.aspx, it has a link <a href= "webfolder/abc.aspx" on click it opens properly but when i open another link which is on abc.aspx, link <a href = "webfolder/abc1.aspx"> this one does not opens instead. it copies webfolder/webfoldertwoice. i wanted to understand the process, because i tried windows.location and equivalent but they all behaved in then same way.
Cannot get value of input dynamically created / added by program or Jquery using clone
Dear Sir Working on project were need to add subjects dynamically using Jquery CLONE as follow. for existing rows everything runs perfectly ok but for programatically added row cannot get value entered in input using JQUERY script when save (savebtn) is clicked works fine for existing rows $(document).on('click', '.savebtn', function () { var thisid=this.id; console.log(' id clicked='+thisid); var splitid=thisid.split('save'); var onlyid=splitid[1]; $('#onlyid').val(onlyid); var schoolid=$('#schoolid').val();
how to insert,update multipule rows to wcf dataservice from jquery
I have used only aspx page and javascript. so from page, i want to call jquery ajax method to send more than one row at a time to WCF data service. data could be of one table or more than one tables, related or non-related. os there is any documentation exits then pls send me the link with an example. few people said datajs,js also does it, but I could not open the documentation of the library may be something wrong with the site. one more thing, thought wcf data services might have described the
change material icons entity code on click
Hello, I'd like to change a material icon when a button is clicked using jQuery, changing from visibility `<i class="material-icons"></i>` to visibility_off `<i class="material-icons"></i>` and vice-versa clicking again on the button, but I don't manage to toggle entity codes. ``` <button id="toggleVisibilityArchivedAction" class="btn btn-info"><i class="material-icons"></i> <span>Show datas</span></button> ``` ``` $('#toggleVisibilityArchivedAction').click(function (e) {
Aftwer AJAX success load decoded data from temp file
Dear Sir/Madam Following data I am getting as out of a a function (as a result of tree data output) tree=%7B%22li0%22%3A%7B%22a0%22%3A%7B%22name%22%3A%22Main+MAN%22%2C%22age%22%3A%2298%22%2C%22gender%22%3A%22Male%22%2C%22pic%22%3A%22images%2Fprofile.png%22%7D%2C%22a1%22%3A%7B%22name%22%3A%22Wife+2%22%2C%22age%22%3A%2255%22%2C%22gender%22%3A%22Female%22%2C%22relation%22%3A%22Spouse%22%2C%22pic%22%3A%22images%2Fprofile-f.png%22%7D%2C%22a2%22%3A%7B%22name%22%3A%22Main+Wife%22%2C%22age%22%3A%2291%22%2C%22gender%22%3A%22Female%22%2C%22relation%22%3A%22Spouse%22%2C%22pic%22%3A%22images%2Fprofile-f.png%22%7D%2C%22ul%22%3A%7B%22li0%22%3A%7B%22a0%22%3A%7B%22name%22%3A%22Son1%22%2C%22age%22%3A%2278%22%2C%22gender%22%3A%22Male%22%2C%22relation%22%3A%22Child%22%2C%22pic%22%3A%22images%2Fprofile.png%22%7D%2C%22a1%22%3A%7B%22name%22%3A%22wife+son+1%22%2C%22age%22%3A%2270%22%2C%22gender%22%3A%22Female%22%2C%22relation%22%3A%22Spouse%22%2C%22pic%22%3A%22images%2Fprofile-f.png%22%7D%7D%2C%22li1%22%3A%7B%22a0%22%3A%7B%22name%22%3A%22Daughter+1%22%2C%22age%22%3A%2268%22%2C%22gender%22%3A%22Female%22%2C%22relation%22%3A%22Child%22%2C%22pic%22%3A%22images%2Fprofile-f.png%22%7D%2C%22a1%22%3A%7B%22name%22%3A%22Daughter+husband+1%22%2C%22age%22%3A%2275%22%2C%22gender%22%3A%22Male%22%2C%22relation%22%3A%22Spouse%22%2C%22pic%22%3A%22images%2Fprofile.png%22%7D%2C%22ul%22%3A%7B%22li0%22%3A%7B%22a0%22%3A%7B%22name%22%3A%22d1-son1%22%2C%22age%22%3A%2266%22%2C%22gender%22%3A%22Male%22%2C%22relation%22%3A%22Child%22%2C%22pic%22%3A%22images%2Fprofile.png%22%7D%7D%2C%22li1%22%3A%7B%22a0%22%3A%7B%22name%22%3A%22daughter+1%3Edaughter%22%2C%22age%22%3A%2267%22%2C%22gender%22%3A%22Female%22%2C%22relation%22%3A%22Child%22%2C%22pic%22%3A%22images%2Fprofile-f.png%22%7D%7D%7D%7D%7D%7D%7D
Trouble with a jQuery blur form event
Here's the page in question: https://pr-infrared.com/product/trijicon-reap-ir-mini-thermal-riflescope/ See how it says "Starts at $6,999.00"? Next choose any of the options from the dropdown menu. Notice how the price doesn't change? Now click anywhere outside of the select dropdown box and watch the price update to what it should be. That's not how it should be. What should happen is the price should update as soon as you select a new option from the dropdown menu. In other words, you shouldn't
Adding new content to webpage, but new content does not interract with jQuery
Hi Everyone I am realtively new in jQuery and I would like to ask you for help. I'am doing my school project and there is one thing I do not understand when I added new content by jQuery to the website it does not work (new content) for a clickable option. The old content that is on the website do work properly, but new would not. I attach jsfiddle link. https://jsfiddle.net/ujy8sLpf/2/
How to advance to the next slides when a video ends?
I'm working on something to be used on TV broadcast where it shows the camera, a menu and bottom line at the bottom of the screen. Everything works great until I have a video to be played and I need to advance to the next slide. When the video ends, it plays it again and the right menu advances to the last item and scrolls until it can no longer scroll. Also the bottom part advances again when the second video ends. Here's what I'm talking about if that didn't make sense: https://codepen.io/openbayou/pen/dyYvYRN
is there any funtion exists in javascript like c# function datatime.specifykind
DateTime.SpecifyKind(Convert.ToDateTime(filterParam.dtFrom).Date, DateTimeKind.Utc); well the main question is. i get datetime in json string "2019-01-01T00:00:000Z" i do not want to remove Z out of it and i want to show it on page with ddMMyyyy formate, when i use moment(day).format(timeFormat);. this reduces my date by one as my local is America. so please suggest how should I format.
another Math.random() problem
I'm using a Math.random() function which determines the length of a delay: function dl() { var pause = [1600, 1600, 2400, 2000] dlay = Math.floor(Math.random() * pause.length); return pause[dlay]; } which works fine. Then I want to use another function with different delay possibilities: function newdl() { var paws = [400, 400, 300, 200] dly = Math.floor(Math.random() * paws.length); return paws[dly]; } --but this newdl() returns values from dl() ! I've
JQuery change background not working
Dear Sir/Madam please refer http://ca-4-india.online/membersearch.php We are listing Activity (Each activity has 2 options Yes , No) viz Income Tax has 2 options Yes or No GST has 2 options Yes or No ------------------------------------------------------------------------------------ when clicked on Option No We want to change 1. for item clicked we want to (NO is clicked) color of the text to white background color to #9C1041 2. For Option Yes (currently green background and
append data jquery
Hi I'm work in reply to a comment my problem how to append text in ckeditor
Next Page