Recived JSON data sen by Jquery
Hi. I have a problem with recived JSON data by Jquey. I recive data ba Google apps script, but this no matter. Data is sensed (by test) from html file from my local computer and recived by Google script. Code of my html. <!DOCTYPE html> <html lang='pl'> <head> <meta charset='utf-8'> </head> <body> <div onclick ="A1()"> TEST </div> </body> <script src="http://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
How to close the current tab using jQuery?
Please guide me, To close the current tab using jQuery. function closeCurrent() { var x = confirm('Are You sure want to exit:'); if(x) { //window.open('invalidUrl.html', '_self', ''); // not works //window.open('invalidUrl.html', '_self', ''); // not works //window.open('invalidUrl.html', '_self', ''); // not works window.close(); } } <button onClick="closeCurrent();">CLOSE WINDOW</button> Thanks, Surendar
Cascade method not taking place between column drop-downs
Dear All, I have Data table with some content , But when I filter the column the cascading between columns are not taking place . Example : If you see my below snap I have employee Donna Snider , When I select it I should get all the positions of that particular employee in my "Position" column drop down .But I am getting all the positions of my table in drop-down. And I a expecting all the drop-downs to hold the relevant values of employee when I select any employee name . https://jsfiddle.net/spspecalist87/Lhxnfsy5/5/
WP Media Uploader Unselect Image on close
Hello, I am a WordPress developer. I have created an image uploader on Custom Taxonomy [like a featured image for taxonomy]. I am able to upload the image and save it. The problem is, if I do not select image from media uploader popup and just try to Save it then the image selected in previous taxonomy term gets added on the current taxonomy term as well. Lets say I have selected an image for taxonomy term A and save it, it gets saved. Again if I add another taxonomy term B without selecting the
Watermark
Hi I am trying to use jquery to add a watermark to an image. I understand little of jquery any help would be appreciated. The relevant code is in the function ChangePic -class picnamew ......(file:ecovib2d_adriant.php (txt)). Thanks.
Dynamic Multiple Dropdown list with append method not working
Hi guys, my problem is that in browser my dynamic multiple drop down select list not showing at all !! i m using append method like that. i have two drop down, when click on item in first drop down, in show data to secound dro pdown (is multiple), but in secound dropdown don show data, but data loaded in HTML (when insept dropdown with chrome). first dropdown : secound drop down (multiple) : and insept dropdown : and my jquery code : var populate_models; $(document).ready(function () {
Calculating the height of a div using line-height
Hi, I'm new here. :) I'm redesigning my portfolio page: marxen.design/test I want to have an intro <div> filled with ///////////// but I want the <div> to end after the page fold without cutting apart the last text line. So heres what I've tryed: var mathHeight = ((Math.ceil(($(window).height() -($(window).width()*0.1)) / $("body").css('line-height'))) *$("body").css('line-height')); var introHeight = function(){ $('#intro').height(mathHeight); }; introHeight(); css: #intro { width:
Hide Jquery Data-table filter drop-down option for particular column
Dear All, I am using Jquery Data table to hide the filter drop-down for particular column .When I use the below lines it is hiding entire column instead of drop-down of that column . Can any one please help me what I am missing to achieve my task https://jsfiddle.net/spspecalist87/Lx5wykk5/ $('#example').DataTable( { "columnDefs": [ { "visible": false, "targets": 0 } ], Srk
Checkbox limit-with partial id=^ s
I’m having a small problem finding the right Jquery to get this to work. Building (pro-bono) a unique library checkout page for a non-profit. They want books/titles listed under the subject(s) they cover, many titles cover multiple subjects. It’s a camelid org and have many titles that cover for example Training, health, breeding, etc. Building the list using PHP, I create the unique IDs of each title and subject. The ID contains the sequential title number, the number of subjects represented and
jquery changing img src dynamically
Hi Every body, I've a question, in this following script (in WHILE loop), i'm receiving a array (result) containing a image (named process_img) and then I dynamically assigned as follows: $('#process_img').attr('src',result.process_img); While processing I could receive 3 different states (like opened.gif, closing.gif and closed.gif). Everything working fine in Firefox but not in Chrome or even IE. Could you please help me to find out a solution. Best regards Raphy $('#process_img').click(function(){
Using .load and the loaded page uses jQuery
Trying to write my first Mobile app using jQuery. So far I have managed to navigate through several pages, but now I need jQuery to do things on these pages. I merely seek to explore this, but I am unsure the appropriate terms to use when searching.
Making cards match
I am trying to make a matching card game to become better in js in which when you open two cards that match they disappear from the deck. I am populating a ul with the images from an array like so: var masks = ["1.jpg", "2.jpg", "3.jpg", "4.jpg", "6.jpg", "7.jpg", "8.jpg", "1.jpg", "2.jpg", "3.jpg", "4.jpg", "6.jpg", "7.jpg", "8.jpg"]; for (var i = 0; i < masks.length; i++) { $(".deck").append('<div class="card"> <img class="card" src="./' + masks[i] + '"/></div>'); } }) Here is
Defining hidden field variable based on radio button selection
How can I pass a hidden field based on the answer to a radio button question? Client Conditioned Radio Yes Radio No If radio = yes, pass conditionAlert value="current" If radio = no, pass conditionAlert value="standby" <label class="form-check-label" for="clientCondition">Is client conditioned?</label><br> <label><input type="radio" name="clientCondition" value="Yes" required>Yes</label> <label><input type="radio" name="clientCondition" value="No">No</label>
unexpected character at line 1 column 1
I am receiving Player has signed in. jquery.js%20line%202%20%3E%20eval :137:9 SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data in my console log and here is this console.log("Player has signed in."); $("#content").load("pages/play.php"); } else if(data == 0){ $("#content").load("pages/signIn.php"); return false; }
Show hide div based on radio group value
Please someone tell me how to get this working to show/hide div based on radio group value on page load and if changed <script> $(function () { if ($('input[name=assumptions]').val() == 1) { $('.assumptions-row').show(); } else { $('.assumptions-row').hide(); } }); </script> <form> <p> <label> <input type="radio" name="assumptions" value="1" id="assumptions1"> 1</label> <br>
Ajax Poll Script showing insecure XMLHttpRequest
I created a new website which ask user to poll. I am using "Ajax Poll Script" by phpkobo. Site is ok on non-ssl but when I install ssl certificate then its showing Mixed content error. I search about it here but didn't got any solution and also tried to fix it myself but failed. I am new to this type of mixed content error. **Exact Mixed Content Error Showing is:** Mixed Content: The page at 'https://onlinevoter.org/site/' was jquery.js:4 loaded over HTTPS, but requested an insecure XMLHttpRequest
Unable to to set the value for colned dropdown
Dear All, In below fiddle URL I am able to colned html drop-down to the html table on button click. https://jsfiddle.net/spspecalist87/yzo4j3ax/1/ And I had added the below piece of code in it to set the value for cloned drop-down . But I am finding no luck with it can any one please help me how can I do it. drbtabletop.attr("Value", "Andrew"); Srk
Friends? Can I make a button that itself will be pressed all the time, after a specified time
Can you plz show how do it with jquery
swipe to animate PNG sprite sequence
Hi The problem I'm having is how to control the width of the area the user swipes (touch move) their iPad or other iOS device and the 'mousemove' on desktop to effectuate a PNG sequence animation. At the moment the user has to swipe the entire width of their iPad to play the entire sequence of a sprite PNG. NO one ever swipes the entire width and so they don't see the full left and right frames which is vital in this particular case.. I would like to decrease the width of the area they need to
Remove display:hidden from an image on click
I am populating a div with images from an array that is inside a div with a black background: var masks = ["1.jpg", "2.jpg", "3.jpg", "4.jpg", "6.jpg", "7.jpg", "8.jpg", "1.jpg", "2.jpg", "3.jpg", "4.jpg", "6.jpg", "7.jpg", "8.jpg"]; $(document).ready(function () { for (var i = 0; i < masks.length; i++) { $(".deck").append('<div onclick="display()" class="card"> <img class="card" src="./' + masks[i] + '"/></div>'); } }); the img tag has a css code added to it display:none so that
How to duplicate the music tracks of this Jquery player?
I am new here and learning to JQuery and hope I'm not asking in the wrong area. Well, I do not understand almost anything about JQuery yet but I've tried it a lot by myself... I'd like to duplicate the tracks on my player, with its control bar being just one. Explaining better; I wanted the tracks to appear in two places of the site and that by clicking one is like clicking the other as well. When using the controls (play, next etc) also work in both at the same time. In short, the <audio> tag will
Show the total based on select menu
I have this html below where the user can select how many "registrations" wants for each registration type. Each registration type has a price associated, so if the price of registration type "general" is "10€" and the price of the registration type "plus" is "5$" and the user selects just one of each registration type the total is 15$. But if the user selects one of the registration type "general" and two of the registration type "plus" the total is 20$. Do you know how to properly show the total
JSON with Loop
Hi, I have below response from ElasticSearch. URL which i typed in was http://localhost:9200/dummytest/_search?pretty { "took": 0, "timed_out": false, "_shards": { "total": 1, "successful": 1, "skipped": 0, "failed": 0}, "hits": { "total": 10, "max_score": 1, "hits": [ { "_index": "dummytest", "_type": "testusers", "_id": "1", "_score": 1, "_source": { "ndex": 1, "firstnamename": "KC", "lastname": "Park"}}, { "_index": "dummytest", "_type": "testusers", "_id": "2", "_score": 1, "_source": { "ndex": 2,
How to Count Jquery Data-table Individual column (select inputs) total values or options and display at top of Column Header
Dear All, In my jsfiddle there is a code where I am able to display information using Jquery data-table which is perfectly fine .And there is column "Name" having select drop-down on top of that it which is also working fine to filter the data. My client insists me to get the total count of drop-down options or drop-down values for Name column and display the value on top of the column header. https://jsfiddle.net/spspecalist87/339q4957/3/ As we can see in the drop-down of "Name" column there are
Unable to Disabled button , Input and Select control's on button click for html table
Dear All, I had written the below code where I required to disable the input , select and button controls and change the background color on click the submit button. But I am finding no luck to move further.Can any one please let me what's going wrong in my below function. <head> <style> #customers { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; border-collapse: collapse; width: 100%; } #customers td, #customers th
Prevent carriage returns
I have a vanilla js function below that prevents any line breaks in a textarea whats the jquery equivalent of this please, covering all bases if users is typing or pasting content.: window.onload = function(){ var short_desc = document.getElementById("short_desc"); short_desc.oninput = function() { document.myForm.short_desc.value = document.myForm.short_desc.value.replace(/\n/g, " ").replace(/ +/g," "); } };
How To upload a Xlsx File to server and wait response of server..
Hi, how to upload a File using jquery+ajax and wait the response of server? Thanks
Switching between to classes
I have (thanks with some help) an input field, where the user can search for words. Now i trying to do something, but cant figure it out, so maybe, some one can help me? A.t.m. the site shows for each word also an symbol. Now i'm trying so that all the symbols are always hidden at the start. Then when the user search for the a word, i want for that specific word that the symbol appears and then the word disappears. [example given: the site shows this: "Hello, how are you?", when the user then search
Transferring Data from one web-page to another
Hello, I am pretty new to programming and even newer to jQuery so I apologize if this comes off as a very naive or foolish question. I am trying to figure out how to send information (numerical) from one web page to another web page. The desired end result is that when I load the 2nd web page, it will use the information provided by the 1st web page, within its function and give the result. Normally, the second page would require you to select a button after inserting numerical data/information into
change not working in EDGE
Hi, I have a form running Jquery. When the input field are changed, the data is saved via Ajax. I am doing this via a $('#form_input').change(function() { //do stuff... //save via ajax }); The function is triggered after a tabulation or a loss of the focus when the field is changed. This works perfectly well in Chrome, Firefox and Microsoft Edge 40.15063.674.0 When I run the same code in Edge version 41, it does not work. Any ideas, is this a known issue? Kind Regards Fred
convert Date Format from ( Monday, April 30, 2018 ) to DD:MM:YYY (4/30/2018)
Dear All, I had written the below code to convert the data Long date to Short date . Actually I am having the value "Mon Apr 30 10:30:00 UTC+0530 2018" in a var variable .And I am using the method toLocaleDateString() to get the format of DD:MM:YYY( 4/30/2018 ) . But the problem is when I use the same method toLocaleDateString() I am getting the result as Monday, April 30, 2018 . Can any one please help me how can I solve it Srk
How to create function to dynamically created ids
Please I will like to know how to create a function or event listener to check for dynamically created div elements using their ID. I have a dynamically created page which contains fetched content from a jquery ajax backend. What i want to do now is use set interval and refresh the content of the div should incase the content was changed by another user. e.g. <div id= "product1">Content of product 1</div> <div id="product2">Content of product 2</div> but the id is being set from a php backend that
centre one of multiple inline/floated elements
I already know how to centre things using margin:auto or text-alight:centre. Suppose you have a div which has multiple inline/floated elements. One of these is always present and is called object A. To the left of object A there is always one object. To the right of object A there is a dynamically generated list of other object, there is an unknown number and always at least 1. Is there any easy way to centre object A ether in the centre of the available space (so it is equidistant from both of its
Input text that triggers a switch
Hi I'm writing a html site, and i'm trying to add a jquery input system. I wrote a html page were i divided every word into a class; an class= "A" and a class="B". every class also has a another class attached to it; class="A key1" and a class="B key2". i added a css stylesheet already for the A and B classes. What i want is this: If got a text where every word has a "A key1" and "B key2" class. Default i want the "key1" class to be display:none;. On the top of the page, i want a input box, where
How can I rewrite this with Handlebars.js?
Hi guys, I created the following pen, which is a simple JavaScript to get an API response and output the result: Ajax API with vanilla JS Now, I'm trying to learn Handlebars.js and I need an example with Ajax API with Handlebars.js. Could you please rewrite my example, which is in vanilla JS with Handlebars.js? Thanks
Unable to get the value of input and select control values
Dear All, I had written the below code where I am able to fetch the values of table row expect input control and drop-down-control .Can any one please help me what's wring in my below code. <head> <style> #customers { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; border-collapse: collapse; width: 100%; } #customers td, #customers th { border: 1px solid #ddd; padding: 8px; }
Promise alternative
Hi! I'm using promises but have to find a jQuery alternative to make it crossbrowser compatible. How do I have to change that return new Promise(function(resolve)... ? I'm at the very first time getting in contact with promises, no idea how to use a deferred object to get that running.. return ABCREQUEST($.extend(config, { part: params.A }), apiParameter) .then(function (data) { return new Promise(function (resolve) { parseInfo(data, config, function (isOk, responseData) { resolve(itemBuild$(config,
JQuery data-table with individual filter / search column
Dear Contributors , I required you all support , Actually I am professional in manual testing and now started working on programming. My client has given me the work to have data-table with filter drop-downs for each column for the below html table using jquery with. Can any one please help me how can I do it. <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> * { box-sizing: border-box; } #myInput { background-image: url('/css/searchicon.png');
Data filter
Is this code is right? the data filter is not working! //data-filter $(document).ready(function(){ $(".filter-button").click(function(){ var value = $(this).attr('data-filter'); if(value == "all") { //$('.filter').removeClass('hidden'); $('.filter').show('1000'); } else { // $('.filter[filter-item="'+value+'"]').removeClass('hidden'); //
detecting exit-intent caused by back/forward, close tab/browser and url bar
i know that the beforeUnload event can be used to detect when the user is moving off the page. I also know that events which nothing to do with the DOM such as back/forward, close tab/browser and url bar use cannot be detected directly which means the following psudocode is not possible $(window).on('beforeUnload' , function ( e ) { if( event.target = back/forward || close tab/browser || url bar ) { return "please dont leave"; } }); Is there any way to achieve
Next Page