Need to post a hidden form field with jQuery
I need to fetch a csrf value from a php and post it via a hidden form field using jQuery. My code is here: https://stackoverflow.com/questions/47196897/how-to-have-jquery-to-return-csrf/ What wrong I did there? Any advise is appreciated.
Jquery to add dymic menu
Hello I am new to jquery, I would like to develop a pizza site, which should have left menu as products, center menu as sub products . I will have menu configured from JSON URL which keeps updating from it source. [ ideally lotus notes ] which is left side of the page. and sub menu should be automatically updated from selected products in main menu.. Can anyone please help me how this should be done. Thanks
Detecting height of div and dynamically resize
i have two 50/50 boxes. Left box has textual content inside and the right side of the box has a map inside. When i resize the browser down the height is matched perfectly using a bit of jquery. But when i resize the browser back up to a bigger size, jquery doesn't update the css height. The code i manage to put together based on what i have read on the net is as follows. An example is here http://217.199.187.191/scalegillfoot.com/ look very bottom where map and surrounding area is. Resizing the browser
Submit form without refresh
I was googling how to submit contact form without refreshing. I found some plugin. As about success message I guess this is impossible for ajax to know if the message is actually emailed on php part? Right? Or how the code should be to know if this is actually emailed without error?
Passing the Value Button when click.
I know some of you this problem is pretty simple to do, but I am working in a week to find it out what is the right way to function it well. in the 1stpage.php there is a multiple buttons with different values in it, ie: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"> </script> <a href="#myModal" data-toggle="modal" value="#01" name="btn" class="button2 btn btn-primary model_open" data-btnval = "#01" aria-hidden="true" data-dismiss="modal" >form</a> when clicking the
On and Off Button
I am using an Action button which is to show if the information from my database is successfully posted to my page, from echoed "Not Posted" --> to "Posted" when the action button is clicked. <?php echo '<a href="#po'.$rs['id'].'" data-toggle="modal" class="btn btn-success" id="post">Action</a>'; ?> here is the code for echoing the "Posted" when the action button was clicked; <php $status=$rs['post']; if ($status<2){ echo "<td>Not Posted</td>";
Why eq(0) returns an array AND no attributes property?
I'm using this function to get the first jquery object: function getfirst(selector) { var selected = $(selector).eq(0); return selected; } This works for me almost everywhere. It returns an jquery object which has "attributes" property.(And so many other properties). The attributes can be enumerated When I want to get an object of table using an 'id' like this: getfirst('#tableMain'); It returns an object has property "0" "length" and "prevObject". It doen't have "attributes" object. property
Initialize Photoswipe with jQuery
My galleries have two different formats: one for photosets, and one for stand alone images. I am trying to use jquery to initialize the gallery, but when I click on an image, it always opens the first image in the page (except when I click on the third image, which for some reason opens the second image). You can see my code here: https://codepen.io/anon/pen/mqWBXm <- Additionally, I would like to get the slideshow to only show the image(s) in each <article> Currently, the slideshow shows all the
Photoswipe + jQuery photo gallery
I am building an image gallery using photoswipe (http://photoswipe.com/), but I'm running into a small issue: when I initiate the gallery, it always shows the first image, regardless of which image I click on. Here's a pen showing my code: https://codepen.io/NordStorm/pen/Kqbpaj What am I doing wrong?
Help with taking values in an array, appending a string in front and behind
Hey guys, I am some what a beginner in jquery/javascript. I am familiar with how it works, but its been a minute since I have worked with it and recently i've been tasked with something that I think jquery/html would be best for. So I have a list of 500 refund numbers, i put them into a text box, click a button, and they currently go into an array, I know this works as when I alert the array, I see my values. What I need some guidance with is how can I take the numbers in this array and make it populate
[jQuery 3.2.1, Internet Explorer, Edge] $.isPlainObject fails when passed object has been created in child (popup) browser window
We have two JS controls - viewer (displays images) and thumbnailer (displays thumbnails). By default they both are located in main browser window but there is a possibility to "undock" viewer from main window and have it in separate popup browser window. We have no issues when using jQuery 2.1.4. But after upgrade to jQuery 3.2.1 we get the following error: Here $.isPlainObject function is being called as a part of $.extend function call. Object that is being passed to $.isPlainObject has been created
Cannot edit data to show information on particular drop down selection
Hello all wanted guidance with my code and a functionality shared part of code here.I want to show "Diesel variant not available)when diesel is selected for a petrol variant like maruti(brand),model(alto),fuel(diesel),but on changing the data "Estimation requires inspection of your vehicle. Please go ahead and book" it still shows the same sentence what can be possible cause and how to fix same. function(data){ if(data) { if(data == 'No 0Price')
Load content into multiple divs simultaneously
Hi; I am new to Javascript and Jquery. I am trying to load content of two divs on pageB.html into two divs on pageA.html respectively. The structure of pages are as follow: pageA.html contains: <a href="pageB.html">link</a> <div id="cl1Content">this is where "imgContainer" from pageB.html sholud load in</div> <div id="cl2Content">this is where "caption" from pageB.html sholud load in</div> pageB.html contains: <div id="imgContainer"></div> <div id="caption"></div> jQuery Code That I am using:--------------
Browser not displaying
Hello, Real noobie. My question is about a demo countdown JS file script, I'm trying run in a web browser The demo script works fine, but when I apply sample code of another format that I’m looking for to the html file script section. It doesn’t display. in the web page Example: I replaced the default script from the index.html file.... <script> $(function () { var austDay = new Date(); austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26); $('#defaultCountdown').countdown({until: austDay});
The direction of jQuery Mobile
When in doubt, simplify... Although I compliment the time and effort that the team puts in to jQuery Mobile, it is obvious that it is not enough to sustain it. So I was wondering whether another route should not be taken, that simplifies the goals and therefor is more realistic to achieve. I develop a healthcare and psychological test web application. A while ago, I used jQuery Mobile to create a nice look and feel, responsive, and with great looking page transitions. Today I completed the work on
use on click do not work after ajax call
Hello, I've using jquery 1.8.2 and here is the following code I have: $(document).ready(function () { var user = 1; $("a.like").on("click", function () { var article = $(this).attr('data-article'); $.ajax({ type: "POST", url: "WebService.asmx/Like", data: "{ 'user': '" + user + "', 'article': '" + article + "' }", contentType: "application/json; charset=utf-8", dataType: "json",
[Ajax] browser console synchronous error using .load()
Hello community, I'm new to jquery with some bases and I need your help to solve my problem that takes me a lot of time Basically, I want a dynamic page where I can load any page on click (I have 2 pages). In practice, all in working fine, up to a certain limit... When I trigger the click one time, I get errors, and with multiple trigger click its even worse and ends with a browser freeze. Index.html : <p class="click-see" href="inc/print.html">Enter</p> // When I click for example here <section
Determining which button was clicked
Hi all, fairly new to jQuery & AJAX, but been programming for years. I want to select a club and display data for that club. I am trying to use 8 vertical buttons like so: <button class="button" >Rotary</button> <button class="button" >Kiwanis</button> etc. and according to the one clicked, I display info with this jQuery. $(document).ready(function() { $("button").???set the correct div in next line by which button was pressed. $("#div1").load("clubFile.txt #divClub") the txt file is something
How to check all checkboxes that are in same array?
Hey.. I'm new to Jquery and could use some help.. The problem is next: I have a foreach loop that is going trow the array of rows in table..Now when I check one check box, the other checkboxes needs to be checked, that are in the same array. I hope that I made myself clear. Here is the table >> SERIJSKI BROJ 222222226 555555555 555555556 555555557 666666666 666666667 777777777 Here is the code >> <div class="col-md-6"> <table id="tabela_zaduzi_plombe" class="table-responsive table table-bordered
Strange Dialog .load Loop
Let me see if I can explain this without a million lines of code to start out with. User selects to add a new part. This then loads a Dialog box with a part search (part-search.php) in it. Part is then searched for. If a no in stock part is found it moves to a (part-add.php). Inside that page is an autocomplete jquery setup. Perfect, everything works great. Here is the redirect/load in new page script $(function() { $('#searchbox').empty(); $('#addbox').load('parts-add.php?pn=<?PHP echo
How to extract part of the resultXML of $.ajax() call?
$.ajax({ type: "POST", url: "some_url", dataType: "xml", success: function(result){ // code... } }); The code above returns me the following XML: <ALL> <FIRST> <content>of the first xml...</content> </FIRST> <SECOND> <some>other xml...</some> </SECOND> <THIRD> <content>of a DHTMLX grid</content> </THIRD> </ALL> I would like to assign the third XML to a DHTMLX grid but I'm not able to extract it from the output
replace undefined values in tablesorter with zero
Hi all, I am trying to replace undefined table values in tablesorter with zero. Can you please help me out on this. Thanks, Vinesh.
How do I use Ajax to get the selected option and save it into my database ?
While working on Ubuntu, I have a PDF file that I want to to convert into text, then I preg_match in order to extract the data I need. After this, I put my data lines into a drop-down list. How would you consider doing this ? - Reena Shetty (Private Consultant at FCC Pvt. Ltd.)
Error: Permission denied to access property "apply"
i am using ASP.NET C# development trigger http://localhost:33245/Scripts/jquery.min.js:14:5486 trigger/< http://localhost:33245/Scripts/jquery.min.js:14:6103 each http://localhost:33245/Scripts/jquery.min.js:3:3129 each http://localhost:33245/Scripts/jquery.min.js:3:700 trigger http://localhost:33245/Scripts/jquery.min.js:14:6079 n.fn[b] http://localhost:33245/Scripts/jquery.min.js:14:6565 <anonymous> http://localhost:33245/:943:21 dispatch http://localhost:33245/Scripts/jquery.min.js:9:8978
javascript: history.go(-1);location.reload(true);
The below Java script work fine for IE but not in Chrome javascript: history.go(-1); location.reload(true); Is there a script available in jquery for chrome? it looks simple but it is not. Please help me
servlet called
I would appreciate someone's expertise to solve my dilemma. I have a website which uses AJAX, jQuery and MySql DB. The code populates a table upon Document.ready call (MVC used: jsp calls Servlet with ($.get controller_1() ) and servlet calls class file (queries DB), then servlet response back to main jsp page. This code dynamically creates a button/( ie to look like a hyperlink). When the button is clicked jQuery used $.get controller_2 ( a different servlet). Unfortunately, the click function sends
Finding out the opacity of an image?
Hi, if I have four images in set up like this: <div id="holder"> <img src="assets/1.png" style="opacity:1"; <img src="assets/2.png" style="opacity:1"; <img src="assets/3.png" style="opacity:0.3"; <img src="assets/4.png" style="opacity:1"; </div> Is it possible to filter and return the number of images that has not got its opacity set to 1? Thanks in advance.
About Ajax and echo/json/ problem
Hi: I meet a problem about the usage of Ajax when seeing the example about treetable, the code example is in http://jsfiddle.net/djlerman/bbj8k9pe/, and the main problem is about Ajax and url: '/echo/json/', the code snippet is as following: function getNodeViaAjax(parentNodeID) { $("#loadingImage").show(); debugger; // ajax should be modified to only get childNode data from selected nodeID // was created this way to work in jsFiddle $.ajax({ type: 'POST', url:
jQuery Mobile and iPhoneX
Hi, Has anyone tried using jQuery Mobile (inside a hybrid application) on iPhoneX? I'm trying to use the safe areas and set headers, content and body styling but it does not seem to be working. I'm using following styles following this link: Safe area constants: .ui-page .ui-header { /* Status bar height on iOS 10 */ padding-top: 20px; /* Status bar height on iOS 11.0 */ padding-top: constant(safe-area-inset-top); /* Status bar height on iOS 11+ */ padding-top: env(safe-area-inset-top);
Using ajaxSend to capture requests from parent page within an iframe
I have a web page that exists on my webserver (that I cannot modify) that sends ajax requests. Within that page is an iFrame which contains a page that I CAN change that exists within the same domain. From within that iFrame, I am trying to use ajaxSend to capture what the parent page is sending but it does not seem to be working. Is this possible to do from the iframe? Here is the javascript that exists in the page within the iframe. <script src="Scripts/jquery-1.4.1.min.js"></script> <script type="text/javascript">
Infinite self referring loop using setTimeout() stops unintentional
Hello Community, it's me again, cannot see the wood for the trees. I want to repeat an image fade mechanism in an infinite loop. Here is the essential code snipped: function sliderLoadNext () { activeImageSliderEntry++; if ( activeImageSliderEntry == numberOfTitleImages ) { activeImageSliderEntry = 0 }; loadUpcomingSliderEntry(); setTimeout( sliderLoadNext , 3000 ); } The function sliderLoadNext () is called
Jquery Memory Leak
We are using jquery 3.1.1 to develop ASP.NET mvc application after 10 mins of continous usage on IE11 we are encountring "Out of memory" issue because of various memory leaks in jquery3.1.1.js at various places. Our application heavy using jquery callback functions. Any one have any idea to fix these leaks?
How to append both single and double quotes in same function
Hi, I am trying to append the single quote and double quote in the same function, but I am unsuccessful. Please help me in doing this. HTML: <input type="button" value="click" id="clickc" onclick="helloMan()"/> <div id="mainDiv"></div> JAVASCRIPT: function helloMan(){ var dialogue = "I'am Suren and I asked him a question, for which he replied, "I don't know !""; getName(dialogue); } function getName(name){ $("#mainDiv").append("<div>"+name+"</div>"); } Thanks in advance, Surendar
Jquery UI 1.12.1 uses .unique which is deprecated in jquery 3.2.1
I am updating a web application to the latest versions of jQuery and jQueryUI. The jQuery 3.0.0 migration tool warns that .unique( is deprecated and should be replaced with .uniqueSort(. Message from JQMigrate console "JQMIGRATE: jQuery.unique is deprecated, use jQuery.uniqueSort" In the unminified calling jQueryUI the function is on line 512 function processClassString( classes, checkOption ) { var current, i; for ( i = 0; i < classes.length; i++ ) { current = that.classesElementLookup[ classes[
How to increase the performance of assigning height (DOM manipulation)?
I have a case which I need to manipulate the height property on the fly. For that matter, I got a solution by using this code: $('table tbody tr td:first-child').each(function(){ var height = $(this).height(); $(this).parent().find('td').height(height); });It works fine and the calculation is precisely correct. However, for the performance, it's pretty slow because in the real situation, the table can have up to 100 rows. Therefore, I tried to ameliorate it by using native js and some other
jQuery datatables
Hola qué tal comunidad busco sabiduría de su parte con esta duda que tengo... Tengo un datatable dinámico con dos campos <Tr> <Th>Nombre</Th> </Tr> <Tbody> <Tr> <Td class="edición">Juan</td> </Tr> Bien así voy llenando mi datatable de manera dinámica...mi datatable tiene más columnas okey y en este caso la clase sigue siendo edición.. Ahora fijence yo quiero que cuando haga clic en cualquier fila del datatable automáticamente aparezca un input de tipo texto, pueda escribir sobre el input y al precionar
change @keyframe CSS dynamically
Then! I am new here. First topic and i need you help. Thank you to who can help-me. I am trying create a slideShow plugin for praticate same and stopped in a trouble. I have the below code: var arrayJson = { '0%' : { 'margin-left':'-0%'}, '33%' : { 'margin-left':'-0%'}, '38%' : { 'margin-left':'-100%'}, '66%' :{ 'margin-left':'-100%'}, '71%' : { 'margin-left':'-200%'}, 100%' : { 'margin-left':'-200%'}, } And i need change a keyframe css called slide: <styles> ....... @keyframe slide
put slide show in sequence
Good morning people! I have a difficult question to solve. Actually, I do not even want a solution, but I teach: So imagine an ul with, say, 5 li's. These li's are inline-block. I'll apply a slideShow effect on them so they run from right to left. So far without mysteries: It works well. My question is this: For each li that runs, a smooth running effect is applied from -0% to -100% in its (normal) position. This, of course, added 100 to 100 to each passing li. No surprise. The doubt: When the li's
File upload >4GB failing on IE using ajaxForm
Hi, I am trying to upload the file >4GB by submitting the formdata using .ajaxForm but getting an arithmetic exception as "Arithmetic result exceeded 32 bits" in jquery.form.js on IE, no issues on chrome.
Finding number of images that are not hidden on the second page on document ready.
Hi, I have created two pages, one has a link to the second that has some images on. I want to be able to hide images on the second page when the document is first shown and then when the button on the first page is pressed return the number of images that are not hidden - in this case two? https://jsfiddle.net/a4poster/j8w5qwta/178/ Can I do this as I am stumped.
Next Page