Preventing blur event on fields when dialog close button clicked
Hi. I have a modal dialog with a field that has some processing (validation, normalization) that happens on the blur event. I want to skip this if the close button is clicked. How can I do this? Thanks.
trying to get the values out of this
I'm using an ajax call and this is what I get in return. I just cannot seem to put the right line in to get out the data I want. There are two objects in the "resultsForGroup" I want to get the id, name, state, incomplete tests and also the "resultsCountByOutcome", "passed" count and the failed count from both objects. Thanks to anyone that helps :) { "groupByField": "TestRun", "resultsForGroup": [{ "groupByValue": { "id": 1190124, "name": "Afresh Networks Tests", "isAutomated": false, "completedDate":
Doing something with jQuery after form successfully submitted
I have a form modal on a Bootstrap 4 page and want to display a success message in the modal after the form is successfully submitted, but my function is firing before validation is completed. Is it possible to plug in my post-validation jQuery in here somewhere? (function() { 'use strict'; window.addEventListener('load', function() { var forms = document.getElementsByClassName('needs-validation'); var validation = Array.prototype.filter.call(forms, function(form) { form.addEventListener('submit',
XMLHttpRequest: Network Error 0x2ee2, Could not complete the operation due to error 00002ee2
We have a piece of code which uploads multiple files to the server, interestingly this code is working fine on Chrome & Mozilla, but it's failing in Internet Explorer, receiving the following error XMLHttpRequest: Network Error 0x2ee2, Could not complete the operation due to error 00002ee2 We tried solutions mentioned in SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3, Could not complete the operation due to error 00002ef3 but still getting a similar issue We changed timeout value for Internet Explorer
HOW I CAN PUT A LINK IN A TABS?
HI, I MODIFY THIS CODE, I WOULD LIKE TO MAKE A EVENT THAT CLICK THE BUTTON AND GO TO A LINK I SPECIFIED. THIS IS THE CODE: <div id="tabs" class="ui-tabs ui-corner-all ui-widget ui-widget-content"> <ul role="tablist" class="ui-tabs-nav ui-corner-all ui-helper-reset ui-helper-clearfix ui-widget-header" center> ..... OTHER CODE ...... <li role="tab" tabindex="-1" class="ui-tabs-tab ui-corner-top ui-state-default ui-tab" aria-controls="tabs-7" aria-labelledby="ui-id-7" aria-selected="false" aria-expanded="false"><a
ajax success div with same name problem
I have a while loop writing rows from the database as separate forms on a page. Works fine. It writes a hidden div just before each closing form tag. They all have same div id. I call a success function that fills in this hidden div with a success messages. Problem is no matter what form I choose the output always gets written to the first form on the page. I have to somehow determine what form was clicked and then tell the success function to use that div name. Not sure how to go about that.
Choose 1 form to submit with multiple forms on page
I have a page with multiple forms on it. Each form as different id but same name and consist of only radio buttons. I want to perform a submit via ajax but U am having a hard time only choosing the correct form in my code. What do I need to only submit the form where the radio button is selected. I have it working fine with only one form on the page. <form id="1" name="myForm"> <input type="radio" name="contract" value="0" class="custom-switch-input" checked> <input type="radio" name="contract"
Autocomplete change background color of focused element on up/down arrow
Hi there, I have a requirement to highlight the focused element with custom background color from the suggestions when the user navigates through the suggestions using keyboard up/down arrow keys. Currently the background color of the focused element is changed when user focuses the element by mouse(when user hovers the element with mouse) using CSS with :hover. But the background color of the focused element is not changed when the user focuses the element using keyboard up/down arrows. I want to
auto complete is not working
please find below code here is the error CreateTopic:70 Uncaught TypeError: $(...).autocomplete is not a function at HTMLDocument.<anonymous> (CreateTopic:70) at j (jquery.min.js:2) at Object.fireWith [as resolveWith] (jquery.min.js:2) at Function.ready (jquery.min.js:2) at HTMLDocument.J (jquery.min.js:2) @{ ViewBag.Title = "CreateTopic"; } @*https://uigradients.com/#LightOrange*@ <html> <head> <title>MyCSS - No Master Layout</title> @*</script>*@ <script
File Drag and Drop
Has anyone come across a way of dragging and dropping files then uploading them when the form is sent. I have got it to work for one file but now I have found out that the client wants to do it for multiple files and remove any if there was a mistake before uploading them. Thanks
How To Select a Specific Option Based on a Condition
I have a table with many rows. Each row contains a select drop down with only 2 options, "Active" and "Deactivated". I wish to offer the user an alert message based on which option they select. The code I have can not distinguish one select from another select. And so returns "true" no matter which option I have selected. I have spent days hunting through SO and nothing works. Here is the HTML Snippet: <td class="category_select"><select class="edit_cat" name="category_value[]"><option value="active"
$.tmpl render html as string
Hi All, I have below snippet of code, expecting to have html page render anchor element whereas it shows as string value. what am I missing, please help me. var lineStartTemplate = $.template('<div class="line"> <span class="name">${name}</span></div>'); var wfDocName='<a href="#" onclick="javascript: viewWfDoc(\'' + clientReq.relatedContentID + '\'); return false">' + documentName + '</a>'; var tItem = {name : wfDocName}; var value1 = $.tmpl(lineStartTemplate, tItem); container.append(value1[0].innerHTML);
Pass html table in POST using jQuery
i want to get all data in table and post using ajax the problem is inside td there is an <input> before i put a condition result like this : -->{"table":[{"row0":[]},{"row1":[{"cell0":"01509"},{"cell1":"HVS BOLA DUNIA 70 GSM A4"},{"cell2":""},{"cell3":"RIM"},{"cell4":""},{"cell5":"320,000"},{"cell6":""}]}]} cell2 and 4 are empty <table id="so_data" class="table table-bordered table-hover"> <thead> <tr class="kop"> <th class="text-center" style="width:50px;">Code</th> <th class="text-center">Description</th>
how do I eport json to variables and access the values
Please see the JSON below. This is what I get in a ajax response. I am new to javascript and need some help. How do I set, for example the Fields(third line down) to it's own variable and then query the variable to show the subfield. for example fields.System.WorkItemType. As the System.WorkItemType has a dot in the middle of it does this make a different of how to get the value? "id": 45, "rev": 1, "fields": { "System.AreaPath": "H3P", "System.TeamProject": "H3P",
Javascript Audio Player Sync Progress Bar Background Color or Image to currentTime
I have a javascript audio player that is able to track the timing or stay in sync while the song is playing and when the user clicks on the progress bar, the slider handle will set the value of the "audio.currentTime". Here is the actual audio player that I'm currently testing. Please take a quick look: http://newsletters.aaronestebancoaching.com/test1/1.html But what I'm trying to do is create either a background color or background image that will also move along the progress bar to sync up with
how to save checkbox state wehn page is reload
Hi, I have a checkbox, I've defined two state for it, and when I reload page, this checkbox back to the default state (or unchecked). I got in trouble at the forum, but I did not get my answer. This is my code. :$(document).ready(function () { $('#mycheckbox').change(function () { var returnVal = ("Are " + "you sure?"); if (returnVal) { postToServer($(this).prop("checked")); } else { $(this).prop("checked", !$(this).is(":checked")); }
Event delegation for dynamic table with button
<input type=button> column is created in each row. Id attribute is assumed to be okay to use. Documentation has said that in a handler the selector ':button' will work for both <input type=button> and <button>. The table with INPUT tags having values of record number is created. But clicking on a choice does not respond using these dynamically created columns and it appears that event delegation is being thwarted somewhere. $(document).ready(function() { $('#studentlist').on('change','#selectstudents',function()
Refreshing a page implicitly without the user noticing
I was wondering if there is a jquery way to implicitly refresh a page without the page blinking, i know the common way is like this below. Regards <script> $(document).ready(function(){ $("#divid").click(function(){ location.reload(true); }); }); </script>
When user click on close tab, display error if form is not validate
Would you please give a solution for this: When user click on the close tab of the browser, display error if the form is not validated.
table sorter / Jan - Dec
Please help, my table is still sorting a-z, I would like to sort Jan - Dec my parser: $.tablesorter.addParser({ id: 'monthYear', is: function(s) { return false; }, format: function(s) { var date = s.match(/^(\w{3})[ ](\d{4})$/); var m = date ? date[1] + ' 1 ' || '' : ''; var y = date && date[2] ? date[2] || '' : ''; return new Date(m + y).getTime() || ''; }, type: 'Numeric' }); my call: $('table.tablesorter').tablesorter({ headers:
autocomplete
I am having problems with autocomplete. All the suggestions are coming out as one line. Eg ANOTHERTESTTEST instead of ANOTHER TEST the Test underneath. This is in company.php to get the selection if (trim($Msg) == "") { $term = StrippedChars($_GET['term']); $sqlstring = "SELECT * FROM companies where name like '%" . $term . "%'"; if (!($result = @ mysqli_query($connection, $sqlstring))) { $Msg = "An
rest api azure devops
Hi, I'm really struggling to get the authenication header to work, to access my azure devops. I've tested the path and the Personal Access Token (PAT) with powershell. Everything works. I just cannot get the same to work in javascript/jquery. Please see my code below. I've put down two different ways I've tried and commented it them out. would really appreciate the help. // var username = "username"; // var password = "54--PAT-TOKEN--xq"; var vstsAuthHeader = { "Authorization": "Basic " + btoa("" + ":" + "54--PAT-TOKEN----xq") }
column not directly summing
i have dynamic table i want to update total, but total only summing old row ( not include new row ) <table id="so_data" class="table table-bordered table-hover"> <thead> <tr class="kop"> <th class="text-center" style="width:50px;">Code</th> <th class="text-center">Description</th> <th class="text-center" style="width:100px;">Qty</th> <th class="text-center" style="width:30px;">Unit</th> <th class="text-center" style="width:100px;">Price</th> <th class="text-center">Total</th> <th class="text-center"
strange jquery behavior
I use jquery http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.js Also use this https://cdn.jsdelivr.net/npm/pjax@0.2.8/pjax.js I try to use ctrl+click but it not work debugger show that first run pjax, then jquery line 4291 here code return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ?
jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
undefined;
I replace line jQuery.event.dispatch.apply( eventHandle.elem,
toggleClass Fade effect not working with display:none/block.
$('.item a').click(function() { $('.mydiv').toggleClass('displayit', 5000); }); So I've created div with display: none, and jquery that adds display:block (.displayit) when I click on .item a (link). Now, I want to add fadein and out to toggleClass but it's not working. I added jquery-ui.js and it still does not work.
showing data in modal on click button not working
<!-- Main content --> <section class="content"> <div class="row"> <!-- Left col --> <section class="col-lg-12 connectedSortable"> <table class="table table-striped table-bordered data display nowrap" style="width:100%" id="data"> <thead> <tr> <th>Code</th> <th>Description</th> <th>Category</th> <th>Merk</th> <th>Qty</th> <th>Price</th> </tr> </thead> <tbody> <?php foreach($stock as $s) { ?> <tr> <td><?php echo $s->code ?></td> <td><?php echo $s->description ?></td> <td><?php echo $s->Typename ?></td>
Sortable and drag speed issue
I have a jQueryUI sortable list. I need to keep track of each new index of the element while dragged, based on the "change" event. But it only works reliably from slow, up to normal drags. If the user drags the element quickly, the "change" event loses track of some indexes with no error thrown in the browser's console. Here is a jsFiddle that shows the problem:https://jsfiddle.net/yhp3m6L8/2/ In this jsFiddle, you can drag an element and see its index change. Below the list, there's a console emulation
JQuery Image Carousel Animated Roundabout Stopped Functioning
Hi guys, I have a JQuery roundabout on the home page of my site. It stopped functioning recently, and I'm attempting to fix it. I would greatly appreciate any help trying to resolve this issue! Here is the web page where it's malfunctioning: http://www.birkeloart.com And here's the code for the page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"> <head profile="http://gmpg.org/xfn/11">
Autocomplete hidden a part of response
Hi , sorry for english thi is a part of my function to get response of autocomplete : $arr_result[] = $row->comune.' ('.$row->sigla.') <span style="display:none;"> ['.$row->id.']<span>'; echo json_encode($arr_result); in my input field i want hide the value in the span but the response is : Alzano Lombardo (BG) <span style="display:none;"> [1934]<span> HOw can
load div after div after div ...
Hi, I have a galery of n photos (could be 1000, 2500 or 5000). I would like to load all the images names in one page with a loader image for each name. I can have 2500 names for example, with 2500 times the same loader. And after, I would like to replace the first loader with the jpg of the first image. As soon as the first jpg is loaded, the script replace the second loader with the image of the second images, and so on. The goal is to load all the images names in one time and after, to load all
Highlighting the cell on character (.) input only
I have this jquery code to highlight the table cell when a number is entered. I need highlighting only when a dot (.) is entered in the cell only. So when a dot (.) is entered in the cell, the highlight will take place, other times not. here is a fiddle example. http://jsfiddle.net/k6p3ecL5/ thank you for your help. html: <table> <tr> <td> <input type="text" class="number" /> </td> <td> <input type="text" class="number" /> </td> </tr>
conflict between two javascript
<script> window.onscroll = function() {myFunction()}; var header = document.getElementById("nav-main-container"); var sticky = header.offsetTop; function myFunction() { if (window.pageYOffset > sticky) { header.classList.add("sticky"); } else { header.classList.remove("sticky"); } } </script> <script> var parallax = document.querySelectorAll(".parallax"); var speed = -0.25; window.onscroll = function() { [].slice.call(parallax).forEach(function(el, i) { var windowYOffset = window.pageYOffset,
showing total in table
please help, cannot sum table column. this is my code : <div class="content-wrapper" > <!-- Content Header (Page header) --> <section class="content-header"> <h1> Customer List </h1> <ol class="breadcrumb"> <li><a href="home_admin"><i class="fa fa-dashboard"></i> Home</a></li> <li class="active">Vendor - Customer</li> </ol> </section> <!-- Main content --> <section class="content"> <!-- Small boxes (Stat box) --> <!-- /.row --> <!-- Main row --> <div class="row"> <!-- Left col --> <section class="col-lg-12
on load img hide div
may i know how other div hide when feature image load
jQuery Audio Time Duration Change on Slider Click
I noticed that the following code runs fine on desktop & laptops, but not on my Android mobile or other mobile devices, to change the duration of the song when user clicks on the slider: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div id="timeline-box"> <input id="seekslider" type="range" min="0" max="100" value="0" step="1"><br> </div> **//jQuery to detect when user changes the timeline with the seekslider $(document).ready(function(){ $("#seekslider").mouseup(function(e){
Qunit testcase I want run through build.xml
Hello, I am new in qunit. I have setup initial setup for the qunit testcase. which are run fine when I open the browser. But I want to same test case while I deploy the code in specific env. I have build.xml file where I have setup other java UNIT test case to run as part of the deployment. does anybody have setup to run test case from build file. One more question, I have install qunit in my system. I have try to run through cli. I am getting the error. which I have attached the screen shot. Thanks,
Jquery-UI - Drop Sound Not Playing Properly on iOS
I've set up a codepen here: https://codepen.io/nolaandy/pen/eXeZYK If I drag an image from one drop zone to a different drop zone above, I don't get a sound on iPhone/iPad on the initial drop. Only If I drop an already dropped image in the same spot will it make a sound on iPhone/iPad. Other than this I get sounds perfectly on all browsers, even ie/edge. Any help would be GREATLY appreciated.
When I click on accordion, it make my page scroll down
Hi - I'm using this accordion script http://jqueryui.com/accordion/#default, which works great. But whenever I click on one of the buttons to reveal the info in it. It makes the webpage scroll down. Is any way to fix that? Thanks a ton - Eric
autocomplete Uncaught TypeError: Cannot use 'in' operator to search for 'length' in []
Hi, this is my js: $('#autocode' + num).autocomplete({ source: function (request, response) { console.log(request) $.ajax({ method: 'POST', url: '/retrieveProducts', data: { term: request }, success: function (data) { console.log(response(data));
Future of jQuery Real Time Data
Will jQuery every make something for real time data effecting. Am not talking about Ajax request. As Ajax does some short stuff but we have to add time interval to refresh page. Which I think is making too many unnecessary requests to sever. To which we want the data should effect only when the server side is effected in same time in all device. I know there are alternatives but will jQuery bring this kind of change in future or not?
Next Page