Insert code to auto-refresh current webpage every 120 seconds?
Assume I load a web page which is occasionally updated on the server (=not under my control). To get the updated information I always have to click refresh in my browser. This is unhandy. How can I automatize that? I can imagine that there is a jQuery/javascript/CSS code which I can insert and which tells the browser to automatically update the loaded webpage every e.g. 120 seconds. How does that work in detail? Thank you Peter
clicking on an item adds item 3 times for 3 items in while loop
Hi, I am building a sticker app that a user clicks a sticker and it adds to the HTML 5 canvas. At the moment, when you click on a sticker it adds it, GREAT! If you click it again it adds it the amount of times how ever many items that have the class sticker So if there are 3 items that have the class sticker they all get added, I only want to add 1 item when I click on one item, please help? HTML + PHP <?php while ($row = $statement->fetch()) { ?> <div class="sticker"> <input type="hidden"
Trasnmit url parameters via ajax
I want to transmit a parameter (path of images) to a page using anythingSlider witch load e series of images. this html page work fine. But when i call from another page that not work. I have two pages: the fisrt page do; $.ajax({ type: "GET", async: false, cache: false, contentType: "application/json; charset=utf-8", url: 'Slider.html?name=appart/imgs', dataType: "html",
How do I create a table to show calculation of hours worked in 24 hours format using PHP and JavaScript, Jquery?
Hi, hope I can find the help I need with a website programming project. I'm working on a new website and need to create a time table of hours worked in 24 hours format using PHP and JavaScript (Jquery). In short, the table should layout the days of the week and hours worked and be able to generate the total hours worked at the end of each day and week. EX: Hours Worked 03:20:00 09:30:00 Total: 12:50:00 Any and all help is appreciated. Thanks, JB
undefined is getting displayed through jquery
I have a PHP function which takes 3 parameters GroupId, Year and Month and checks in the database whether there are records less than the selected year and month for groupId and which returns database records. In my case only one record is returned. I am using json_encode(). Data is correctly displayed in json format but undefined is returned when I call this method using $.post() as described below: public function actionGroupsavinginfo($id,$year,$month) { $group = Yii::$app->db->createCommand('SELECT
ajax syntax problem
I want to pass data through ajax to controller but I unable to get that data can any one please tell me syntax for that. I using ajax inside the Jquery Datatable
3.4.1 missing from ajax.googleapis.com CDN
Don't know where to report this, but it seems like 3.4.1 did not get published to ajax.googleapis.com Works: http://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js Does not Work: http://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
Changing hidden field if any checkbox is checked
I've obviously got something wrong here. How do I pass a "interestsYes" or "interestsNo" to a hidden field based on whether any of eight checkboxes are checked? Here's what I have, which basically says, "If any checkbox is checked, set the hidden field "interestAny" to "Yes". If no checkboxes are checked, set the hidden field "interestAny" to "No". $(document).ready(function() { if ($("#clientForm input:clientInterest:checked").length > 0) { $('#interestAny').val($(this).val('Yes')); } else { $('#interestAny').val($(this).val('No'));
how to get ID value from class?
I have 5 images in my console, I am getting undefined badge_img1 undefined badge_img1 undefined badge_img1 undefined badge_img1 undefined badge_img1 I'm expecting t o see: badge_img1 badge_img1 badge_img2 badge_img2 badge_img3 badge_img3 badge_img4 badge_img4 badge_img5 badge_img5 here is my html: <?php while ($row = $statement->fetch()) { ?> <div class="sticker"> <input type="hidden" class="stickerid" id="<?php echo $row['stickerid'];?>"> <input type="hidden" class="path" id="<?php
Sort list item by it's value
So if I have a list like this <ul> <li>2</li> <li>4</li> <li>1</li> <li>3</li> </ul> How can I sort them so they end up like: <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul> ?
Exception of focus event after upgraded to 3.4.0
It will get a exception after a focus event sometimes. Appears after upgraded to 3.4.0.
Upgrading JQuery Versions - Finding / Identifying / Correcting
Good Evening Everyone, I should first start with I am on the Security side of the house and hoping to help my development side a bit (While they are helping me of course). From a PCI Scan we have been working on correcting a. jQuery Core rquickExpr variable with Cross-Site Scripting Vulnerability, CVE-2012-6708 b. jQuery Cross-Domain Asynchronous JavaScript and Extensible Markup Language Request Cross-site Scripting Vulnerability, CVE-2015-9251 This has primarily been finding, replacing
Ajax photo uploader only works when I add debugger;
when I step through the debugger in Chrome browser, my image actually uploads and inserts into the database otherwise it doesn't seem to get into the saveDesign.php Please help? $("#sub").click( function(){ debugger; var canvas = document.getElementById('canvas'); //var context = canvas.getContext("experimental-webgl", {preserveDrawingBuffer: true}); var dataURL = canvas.toDataURL({format: 'png' }); document.getElementById("canvas").src = dataURL; $.ajax({ type: "POST",
I can't understand- He assigned value to a varaible.The value is geeting from the find method . He checked 2 conditions .one for selected length and one for image length.Explain please.Thankyou
$('#image-selections .image-selection-row').each(function(index, selection_row){ var row_index = $(this).data('select-index'); var $selected = $(selection_row).find('.image-select.image-selected'); if( $selected.length ){ var $light_img = $('#image-bar-container img.img-flash[data-img-index="'+row_index+'"]'); if( $light_img.length ){ $light_img.attr('src', 'folder/im-' + $selected.data('pixel') + '.png' ).addClass('light-active'); }
ajaxSuccess/ajaxComplete not working
Hi there everybody, as you will guess, I am new to Ajax so would appreciate a little help if possible. I have a JQuery function which sets the width of a div within a table row and then animates the contents to slide up for pagination effect like so: <script type="text/javascript"> $(document).ready (function () { $('.change').each(function () { if ($('.p p', this).height() > $('.time').height() || $('.p p', this).height() == ($('.time').height() * 2)) { $(this).css({
Need to migrate jquery 1.11.1 to jquery 3.4.0
Hi All, Anyone please guide me how to migrate jquery 1.11.1 to jquery 3.4.0 in asp.net vs 2015 application. Many thanks in advance. Thanks & Regards, Nidhi
Warning MutationObserver responsive
using newest version of jquery 3.4.0 shows following warning: "Use of Mutation Events is deprecated. Use MutationObserver instead"
How to insert a (line)break after (each) <h3> element?
Lets start with a sample code: <h3>title line</h3> <figure .....> <img ....>....</img> <div>...</div> </figure> <div>...</div> When I print a webpage into a pdf file then it happens occasionally that the image is visually appended right of the h3 headline. I don't want this. Such an image should ALWAYS be placed immediately BELOW a <h3> headline. So I would like to insert (from a jQuery script) something like a hard line break after each <h3>....</h3> element. How can I achieve this? A <br/> seems
Old code and .ajax()
Hi everyone! I'm working to renew some old site that uses very old jquery (for example, it does not know what the ".html()" method is. It uses .update() instead of this). When i replace the old library with a new one (the last) - all site's jquery functionality crashes... But i need to use .ajax (instead of the old ajax.request() ) to be able to get data from other site. If i leave the old library - i got "Uncaught TypeError: $.ajax is not a function" in console, but if i place the old library and
jQuery Migrate plugin in production ?
We are upgrading the jQuery version from 2.1.4 to 3.4.0 with the help of jQuery Migrate plugin 3.0.1 looks like plugin restores deprecated features and behaviors so that older code still run properly with out any code modifications. Is it fine to use jquery-migrate-3.0.1.min.js in production systems which does not generate any console warnings ??
Identify an element without class or ID
I am a total novice at javascript and jquery. I can sometimes understand the code I see, but have no idea how to write it. I have a SharePoint page that I wish to modify two specific <td> elements without modifying the master page. There is a <table> with a class that contains these two <td> tags. Please see the relevant code below. I am attempting to change the width value of each of these tags. Any help would be most appreciated. <table width="100%" class="ms-welcomepageheader" > <trbody>
understanding $(function())
Hi everyone, It has been a while and logging in through Zohoo its a zoo... Anyways, I am trying to understand the following function $(function()? I have a page that is my Log screen that I would like for it to load, but for the program flow, not go directly to $(function() {}); I tried the following, but it didn't work: $("Enter").click(function() { $(function() { bla, bla, bla, }); }); Please let me know if this makes any sense or if more info is needed and what type. Thanks,
Change button class when ALL fields are selected
I'm trying to execute a script where, when all select fields have been selected the submit button becomes active and the user can send. Beforehand though, I want the button inactive (working) and a class adding called 'inactive'. What I'm finding is, once one of the (four) selects has been selected the class gets removed and can't understand why as the button stays inactive until all four have been selected.... jQuery('.stage_two_btn').attr('disabled', true).addClass('inactive'); jQuery('.product_lead_class,
invoke doPost in java servlet through ajax
Hey.=) I'm trying to invoke my doPost method in java servlet through ajax command. Don't seem to get it right. I got this code in the doPost method in my servlet: String title = request.getParameter("title"); String price = request.getParameter("price"); String quantity = request.getParameter("quantity"); // and alot more codeGot this code in my HTML: <span>Title:</span> <input type="text" name="title" /><br /> <span>Price</span><input type="number" step="0.01" name="price" /><br /> <span>quantity</span><input
append ul list with li inside
Hey.=) Trying to append a ul with a few li inside and i can't get it right. numberOfEntrance is the div that i want to contain the ul. This works for me: $("#numberOfEntrance").append( $("<ul>").append( $("<li>").html("li1") ) ) And when i try to append a multiple li: $("#numberOfEntrance").append( $("<ul>").append( $("<li>").html("li1") + $("<li>").html("li2") ) ) Have no idea why when i try to append multiple li i get [Object object] and not a li with html in him. Thank you anyone who try to
AJAX Loop and Wait
I have a script/function where I want to call a page/script via ajax. Once that's completed, call another and once that's completed a 3rd and so on. How can I do something like this?
Issue on Filtering Elements by Multi Checkbox Groups
Can you please take a look at This Demo fiddle and let me know how to fix these two issues here I am trying to create a simple filter ui using this code but I have two issue here 1- Filters by Color is not working if you start with them. They work if user first filters by Shape first . 2- on Filter by Shape if you select square it will filter the boxes correctly but if you unchecked thesquare it will remove all boxes (which is not correct it should display all boxes now) Can you please let me know
How to get two values in AJAX with same condition?
How to get two values in ajax : Source-code : 1) database.php <?php $servername = "localhost"; $username = "root"; $password = ""; $dbname = "kolupadi_extension_order"; $conn = mysqli_connect($servername, $username, $password, $dbname ); if(!$conn) { echo "Try after Sometimes" .mysqli_connect_error(); } ?> 2) upgrade.php (Form) https://paste.ofcode.org/Wi8Y3qZftCpSQEKYgjxe9k 3) ajax_data.php : https://paste.ofcode.org/33sxrJp9yTGRxbWpHrek7vY
Keeping Bootstrap modal open after form submission
I have a form in a Bootstrap 4 modal and am trying to replace this modal form with a thank you message within the same modal, but the modal keeps closing after the submit button is clicked. I tried the following, but it's not working. <button type="submit" class="btn btn-primary" onclick="$('#formModal').modal({'backdrop': 'static'});" >Submit</button> The goal is to submit the data to our db when the submit button is clicked and then hide the form and display a thank you within the same modal. Here's
Validating form for company email address pattern
How can we validate an email field using jQuery so that it matches the pattern of our company's email address convention, which is four letters followed by either five numbers or four numbers and a letter? All that would be followed by the domain, which is seven letters followed by dot com. Examples: abcd12345@acmecor.com abcd1234z@acmecor.com
Count checked checkboxes and 2 dropdown values in each function
I have the code below, and I’m trying to work out how to use count to see if the number of checked checkboxes is more than 1, if so show green tick, if not don’t show, but I cant work out how to count those values. As you see it below is where I’ve given up trying everything else, and left it at that point to show. $(document).on('hide.bs.collapse', ".collapse", function () {
var card = $(this).closest(".card");
ProcessTickFunctionality(card);
});
function ProcessTickFunctionality($card)
Show/Hide div on radio button checked
I am trying to Show/hide a div based on a radio button checked. if weekly radio button is checked, hide the div items for Monthly and if monthly Radio button is checked hide the Div items for weekly. My code is not working. Weekly Recur every weeks(s) on: Monday Tuesday Wednesday Monthly The first second third fourth last
How to simulate the play even without clicking through the code below
Hi, how to simulate the play even without clicking through the code below: function registerKeyHandler() { document.addEventListener('keydown', function (e) { switch (e.keyCode) { case 13: // Enter player.toggleFullscreen(); break; case 10252: // MediaPlayPause case 415: // MediaPlay case 19: player.playPause(); break; case 413: // MediaStop player.stop(); break; case 48: //Key 0 log(); break; case 49: //Key 1 setUhd(); break; case 50: //Key 2 player.getTracks(); break; case 51: //Key 3 player.getProperties();
Custom Sort for Datatable
i wan to make custom sort - descending by first column <table class="table table-striped table-bordered data display nowrap" style="width:100%" id="data"> <thead> <tr> <th>ID</th> <th>Date</th> <th>Customer</th> <th>Total</th> <th>Notes</th> <th>Created By</th> <th>Action</th> </tr> </thead> <tbody> <?php foreach($so as $s) { ?> <tr> <td><?php echo $s->Doid ?></td> <td><?php echo date_format(new DateTime($s->Tgl),"d M Y") ?></td> <td><?php echo $s->name ?></td> <td class="text-right"><?php echo number_format($s->total)
Add Text on Image
How do I add text on an image using the .html() ? Please see code below: <!DOCTYPE html> <html> <head> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> </head> <body> <h2>JQuery Lab</h2> <div id="Tile1"> <div><p /></div> <div class="dummy"> <a> <img width="300" height="60"> </a> </div> </div> <script type"text/javascript"> $(document).ready(function(){ $("#Tile1 .dummy img").attr({'alt':'this is a test', "src":"http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif"});
Having Issues Replacing Image
I'm trying to replace an image. what am I missing? I don't really need to replace it. I can just inject it inside the div ccl-test-from tag as well. <div id="adArea"> <div class=".ccl-test-front"> <img src="/image/abc.jpg" alt="Smiley face" width="80" height="60"> </div> </div> $("#adArea .ccl-test-front img").attr({"alt":"This is a test!","src":"/image/xyz.jpg"});
Ajax GET Prompting for Credentials
Hello: I'm making the following Ajax call using credentials I've read from a JSON file. The credentials passed here are correct (I've verified using a debugger); however, I'm still prompted to enter them despite them being passed in the ajax call. What am I doing wrong? // Load data into jsGrid function loadGrid() { $.ajax({ type: 'GET', url: 'https://apps.xxxxxx.xx.xxx/kudosapi/report?member=1', xhrFields: { withCredentials: true }, headers: { 'Authorization': 'Basic ' + btoa(window.creds.kudosapi.user
How can I keep an accordion collapse or open inside a nav-tab after page refresh using Bootstrap 4 and Jquery?
I'm trying to mix Bootstrap 4 Nav-tab and Accordion. My nav-tab is working properly after page refresh it stays on the active tab and I want to do the same with the accordion. I want the keep the active accordion open or collapse when the page was refresh. <ul class = "nav nav-tabs"> <li class = "nav-item"><a href = "#monitor" data-toggle = "tab" class = "nav-link active">Book Monitoring</a></li> <li class = "nav-item"><a href = "#history" data-toggle = "tab"class = "nav-link">Book's History</a></li>
Weird characters showing in jQuery website
I'm trying to read the information but almost half of the page's text can't be read unless you copy and paste the text to other text editor. Texts shows something like this: Texts is readable in my android phone. I'm currently using windows 7. Can anyone help me fix this?
Jquery to display only specific dates and hide the others
I want to know how to add jquery to this following pattern where 2015 needs to be displayed as none and adding 2020 should not let anything get affected. I tried to use n-th child and displayed none for all dates from 2015-1990 but then i realized if i add 2020 2016 would get affected 2019 2018 2017 2016 2015 <div class="article-list mb-3 archive-list"> <ul> <li><a href="#">2019</a></li> <li><a href="#">2018</a></li> <li><a href="#">2017</a></li> <li><a href="#">2016</a></li> <li><a
Next Page