Error with ajax
Hi. I have a form with some fields ad the field for upload an image. Inside this form there is a table with some rows. My target is send all form informations to php. This is my code: $(document).ready(function(){ var array_orari =[]; $("#salva").click(function(){ $('#orari tbody tr').each(function () { var giorno = $(this).find(".giorno").html(); var apertura1 = $(this).find(".ap1").val(); var chiusura1 = $(this).find(".ch1").val();
How to access 2nd level of dynamic JQuery & Ajax menu?
I have a menu which works perfect for 1st and 2nd level only, but I need to go deeper and show all sub levels. The menu is something like this when it loads:
Selecting the elements in an html array
Hi, I want to select the elements in an html array in order and give them an id. I tried for a long time but I could not. For example, I want to give an id to all the elements in ".dropdown".
2 Versions; Same Page (Omit Older; use Newer Version?)
I have seen a lot of posts here, and elsewhere, that discusses the use of multiple jQuery versions. I have read about using the noConflict option: var jq132 = jQuery.noConflict(); I have also read in several places that it is best to avoid this option and stick to 1 Version per page. If I were to go w/the latter option; can I simply stick with the newest version of jQuery and be OK w/the functionality of the page? I expanding on a preexisting web site. The site is in WordPress (if that even matters),
Chrome error report - Uncaught TypeError: a.indexOf is not a function
Hi i show this error at chrome - error report jquery-3.2.1.min.js:4 Uncaught TypeError: a.indexOf is not a function at r.fn.init.r.fn.load (jquery-3.2.1.min.js:4) at mainlayout.js:3 - Source <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title> Default </title> <script type="text/javascript" src="js/jquery-3.2.1.min.js"></script> <script type="text/javascript"> // error point $(window).load( function() { //>
remove element but leave inner content?
Assume I have a html structure like <div class="aaa"> .... <a href="http://.......>linktext</a> ... <a href="http://.......>other linktext</a> ... </div> Now I want ot remove (only inside the div[aaa] element) all wrapping <a> elements which contain a href= attribute but leave the inner content of the <a> elements´. When I code something like $("div.aaa).$("a[href]").unwrap(); then the wrapping div.aaa is removed and not the <a> s How can I achieve this (otherwise)? Peter
Why I can't read json output?
Hi, I have this json output in my console: new_user.js:310 { "UserDetails" :[{"first_name":"ةةة","last_name":"ضضضض","email_address":"jrahma@gmail.com","user_guid":"265aec7f-40cb-11e7-83e2-0cc47a4422ed","activation_guid":"265aec9f-40cb-11e7-83e2-0cc47a4422ed","activation_check_guid":"265aeca3-40cb-11e7-83e2-0cc47a4422ed","user_language":"EN"}]} I am trying to read it using console.log(data.UserDetails[0].first_name); but getting: Error: 'Uncaught TypeError: Cannot read property '0' of undefined',
My script is working in firefox and not working in chrome
Hi, I have this script working in firefox, but it's not working in chrome, I added this script before </body> directly, what should i do???? <script> // Select City $(document).ready(function () { $('option[value="alexandria"]').click(function () { $("#city_service").html('<a class="dropdown-item text_right" href="#" onclick="myService_alex1()">خدمة (1)</a><a class="dropdown-item text_right" href="#" onclick="myService_alex2()">خدمة (2)</a><a class="dropdown-item
Ajax in a function, how return result?
Hi, I make an ajax call from a function and want to return the result (if success). What is the best way to do it? If I do async ajax call, my function returns nothing (well, not the result of ajax call). If I do sync ajax call, Firefox says we should not use sync calls any more.
Where is the source codes of jQRangeSlider demos
Dear Friends: I would appreciate it, if you will send me where is the source codes of the page: jQRangeSlider demos The URL is http://ghusse.github.io/jQRangeSlider/stable/demo/ Thank you; Adam
Restyling jQuery
Hello! I'm using the Tap Widget from jQuery, and im trying to mess around with the design. But my code doesnt seem to do anything, I just simply can't figure out how to adress the right locations, even after inspecting them with Grome. So for example, I want to change the border from the Tap-panel on this page: https://www.brandlangers.com/portfolio-grit2#tabs-1 This is how far i got, but it doesn't seem to work. I'm placing this in the general custem CSS page on squarespace, should be allright.
Sharepoint 2013- Customization of OOOB Picture Library Slideshow Webpart
Hi I have created OOOB slider webpart as below in picture 1 , how to customize it same as in picture 2 with below options 1-previous image icon 2-next image icon 3-image pager in center Picture 1 Picture 2
jQuery is cutting out stuff
Hi, i have a problem that is hard (for me) to debug. I got a page 'a.html': <!DOCTYPE html> <html lang="de"> <head> <title>das regt mich so auf</title> <script src="jquery.min.js"></script> <script>window.jQuery || document.write('<script src="jquery.min.js"><\/script>')</script> <script> function updateHTML(){ $.get("/b.html", function(data, status){ console.log(data); $("#ajaxBody").html(data); }); } $(document).ready(function(){ updateHTML(); setInterval(function(){ updateHTML(); }, 30000); });
Ajax and how to select nodes via JSON
Hi all, I got an success call back from an API in this way, everthing's fine so far. $.ajax({ crossOrigin: true, url: url, success: function(data) { console.log(data.result); } }); The API dont support JSONP, but i using http://www.ajax-cross-origin.com/ and store the proxy at google. Fine, but I can only get data back using data.result If I use Postman, to me it looks that I should use for example data.result.ResponseData.Metros[0].DisplayTime to be able to get "Nu" as the image shows. How
Using jQuery-based Audioplayer-Widget in Adobe Muse
Hi all, I'm encountering a strange behaviour of a adobe-muse created website, that contains a jQuery-based Audioplayer-Plugin. I cannot exactly reproduce the error, the only thing i definitely observed is, that it only occurs at first page load (empty cache). In some, few cases, of the first page load the following error occurs (also see the attachement) Uncaught TypeError: Cannot read property 'event' of undefined at: XYZ.html ... at: jquery-1.8.3.min.js: 2 Has someone an idea
Alert only once after the execution of all the functions in JS
I have update(), delete(), addRow() in my Javascript, I need to update the input text field to Y if all of these functions executes. I have written the JS and HTML code as below Flag Change:<input type="text" id="FLAG_CHANGE" name="FLAG_CHANGE" value="N" onchange="updateFlag()"> function updateFlag() { $('[name=FLAG_CHANGE]').val('Y'); alert('alert sent to tech') } function delete(){ if(confirm("Are you sure you want to delete this data")) { var URL = 'deleteNotes&inspec_id='+inspec_id+'&OWNER='+OWNER;
Hiding a ul
OK this should be pretty easy (or so I thought!) I just want to hide the ul that follows the span with the text 'AIRS' in the following html. I can find the span that contains 'AIRS' with this code ... $('span:contains("AIRS")').css('background-color', 'red'); But then I try the following and I can't get it to work... var AIRSsubList = $('span:contains("AIRS")').find('ul'); AIRSsubList.hide(); Any help appreciated Thanks P <div id="zz14_V4QuickLaunchMenu" class=" noindex ms-core-listMenu-verticalBox">
Targeting data value
I'm trying to target a particular col w/ specific data-index. Here's the html: <div class="header"> <div class="col " style="display: inline-block; min-width: 40px; width: 1px; height: 30px;" data-index="0"> <div class="col " style="display: inline-block; min-width: 40px; height: 30px;" data-index="1"> </div> <div class="tableHolder"> <div class="table"> <div class="row"> <div class="cell " style="text-align: left; display: inline-block; width: 40px; height: 30px;"
How to get browser screen width\height size?
Hi, I would like to know how to get browser screen width\height size using jQuery? Is it possible?
How to insert simple text after element?
Assume I have a html code like: <div class=someclass"> ....</div> How do I insert a simple text (=without a wrapping element) after the <div> element? $("sometext").text().insertAfter($(".someclass")); does not work.
Trying to return a value from a single cell using the map function
Not sure this is the correct forum, this is my first time posting, here. I apologize if it's not. In my program, I place data into a cell in a table from a popup <script> function updateValue(driver_name, value){ var which_driver = value; //alert("Driver Is " + value); //alert("Row Is " + whichRow); reservations.rows[whichRow].cells[7].innerHTML = which_driver;// //reservations.rows[whichRow].cells[7].textContent = which_driver; //'#reservations tr:eq(whichRow) td:eq(8)'.text('Test'); //console.log(testelements);
$.getJSON example on callback function
I want to access data from a $.getJSON call, and return it as an array. My data is transferred correctly to my callback function, but is still undefined when I call my function. Where did I get it wrong? Can anyone please show me an example using $.getJSON? My code: function countTypes( resource ) { $.getJSON( resource, otherFunction ); } function otherFunction( data ) { var types = []; $.each(data, function( i, item ) { types.push( item['id'] );
How to select first row of a table?
Hi, I am trying to select the first or last row of a table, how can I do it with Jquery? I found this script below which deselects a row, but I need to do it the other way round, possible? <script type="text/javascript">
$(document).ready(function()
{
$("[title='DeselectRows']").click(function()
{
$(".highlighted").attr('class', '');
$(".selected").attr('class', '');
}); })
</script> Thanks
Bootstrap carousel has white space between each images on iPhone 6s
When I view my carousel on the iPhone in portrait orientation only, it has white space between each image. I've tried answers from other similar questions on stackoverflow, but none have worked. Here is my site where I am having the problem: https://prominentweb.com
Adding "step" attribute to input field
Hi, I'm trying to add the "step" attribute to a already generated html number input field. jQuery(document).ready(function($){ $( "#fieldname" ).attr( "step", "0.1" ); }); But for some reason its not working. This is what the fields looks like on page load <input id="fieldname" name="fieldname" class="class" type="number" value="">And i would like to change it to: <input id="fieldname" name="fieldname" class="class" type="number" step="0.1" value="">I'm also using Wordpress.
Create a class with metho events
Hi all! I don't know if this is a pure question of jquery or is a navite javascript language skill, but I'd like to implement a class in javascript with events that works as follows: function myClass() { //Private properties var priv1; var priv2; ... //A public method that performs an ajax call: this.asycnCall = function() { $.ajax(..... ).done(function(res) { // This makes something that ensures that the data will be ready
Collapsible Navigation
I have this HTML <li class="parent"><a href="#"><i class="fa fa-cog"></i> <span>Message Streams</span></a> <ul class="children"> <li class="parent1"><a href="#"><i class="fa fa-cog"></i> <span>sean k</span></a> <ul class="children1"> <li class="parent2"><a href="#"><i class="fa fa-cog"></i> <span>TEST 2 TEST 3</span></a>
Hover event handler may be conflicting with CSS hover
Hi all, I'm using a mix of both jQuery and CSS hover states on the same class that's assigned to a list item. The jQuery is replacing text on hover. The CSS is hiding a div and show an image on hover. My problem is that the jQuery hover event is causing the CSS hover to not work and I'm not quite sure why. https://codepen.io/jordan_miguel/pen/qmypNW Have a look at the code and hover over the first and second list items to understand it better. Thanks
regarding adding new button with function
hello everyone, i am working on a laravel project in which i have a button which has to be changed dynamically like waiting for approval if the user approves then button change dynamically i have a ajax function but do not know how to change button dynamically $(document).on('click', '.waiting', function(){ var id = $('.waiting').val(); $.ajax({ url:"{{route('eventbudget.status')}}", data:{'id':id}, success:function(response) {
How do I do this?
I have the following code jQuery + Bootstrap: https://jsfiddle.net/a27rffb2/2/ Problem Statement: The toggle switch should be checked only if all option panels are shown (When you click on option panel to open individually) Thanks for reviewing!!
replace a 2-part class value by 1 part?
Assume I have a source code like <div ...... class="aaa bbb" ....>....</div> How can I replace the class value by another one resp. more precisely how can I delete the "bbb" class? The final code should look like: <div ...... class="aaa" ....>....</div>
css('border-top-width' ) bringing back 5 decimals.
I have some code that creates a box: The baseCell$ on line 9700 that it starts from is a clone of a box template defined a few lines earlier: baseCell$ = $('#boxTemplate').clone(); The problem is that even though the value I'm setting for border width is 1px (see line 9735) the value I read back with css('border-top-width' on line 9736 is 1.11111px. Here's the actual console.log output from lines 9735 and 9736: Does anyone have an idea what might be going on here? Thanks Steve
How to reload current web page every 20 seconds?
Is there a way to reload the current web page every 20 seconds with jQuery? Peter
I know that asterisk means (anything) but how here.
In these statements: var labelElems = document.getElementsByTagName("label"); var jq = $("img[src*=daffodil]"); $("img:even").add("img[src*=primula]").add(jq) .add(labelElems).css("border", "thick double red"); }); </script> </head> <body> <h1>Jacqui's Flower Shop</h1> <form method="post"> <div id="oblock"> <div class="dtable"> <div id="row1" class="drow"> <div class="dcell">
onclick only works once
This is my HTML <div id="divlisting_status<?php echo $row['sell_detail_id']; ?>"> <?php if($row['listing_status'] == "0") { ?> <img id="approve" src="https://pencopyediting.com/images/not_approved.png" sell_detail_id ="<?php echo $row['sell_detail_id']; ?>" listing_status="not_approved" /> <?php echo "<span class='status_list'>Not
IE11 TypeError
I'm doing calcualtions with jquery and all works well in firefox. In IE11 I get the following message, "TypeError: Object doesn't support property or method 'trunc'" I'm using trunc to drop the decimals. What does IE11 need for trunc to work? Thanks. function calculate_net(loan_table){ $(loan_table + " input[name=net]").calc( // create the equation "(borrowed_v) - (lofa_v)", // define the variables used in the equation { borrowed_v: $(loan_table + " input[name=borrowed]"),
JQuery & PHP
Hi . Very new to all this. I have the following form: <form id="name="UpdateStatus" action="" method="post"> <select> <option value="1">Defcon Green</option> <option value="2">Defcon Amber</option> </select> <p><input type="radio" name="StatusMessage" value="default" checked>Default Status</input> <input type="radio" name="StatusMessage" value="last">Last Status</input></p> <textarea rows="5" cols="70" name="status"></textarea> <p><input type="submit" name="submit" value="Update" /></p> </form> I
The url of $.getJSON
I use asp.net mvc. Now when I login the page, I want to display an icon and a number. For example. The url is localhost:23567The image is similar with So in the _LoginPartial.cshtml. I have <ul class="nav navbar-nav navbar-right"> <li class="notifications"> <a href="#"> <i class="glyphicon glyphicon-globe"></i> <span class="badge js-notifications-count hide"></span> </a> </li> And in the _Layout.cshtml, I put the script <script>
if function not exectuiing
Hello guy, I'm new here. My problem is i have a few functions on my <script tag> : a POST, GET and a function which is supposed to change a buttons text if the true condition is met. Everything works except for the if statement(the last function). I Have been trying to resolve it but no luck. It's not executing. Here is the code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>demo</title> <link rel="stylesheet"
Explanation of scrolltop() & scroll() in depth
Please explain Scrolltop() scroll() AND ALSO please explain following in depth what that does $(window).scrolltop()
Next Page