jquery

  1. R

    Is it possible to store Ajax call as an object?

    This isn't necessarily a "how to" question, but rather an ask to help improve upon my own understanding of JavaScript and Jquery. I've been using Jquery a lot lately in my current job and all of my jquery involves a lot of AJAX calls. In several files I have at least 6 ajax calls for different...
  2. N

    Bootstrap dialog box show HTML content in body based on ajax call

    I have the following bootstrap modal dialog box: <div class="modal fade" id="resultModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button"...
  3. I

    How to scale <div> text font size dependent on number of characters?

    I look to make a simple html + css (js if requires) with 2 div blocks of 1000px each with the parent container of 3000px. <div class="blocks"> <div class="block-a">text 1</div> <div class="block-b">text 2</div> </div> I need the div.blocks to be 3000px width and height 1000px; I need...
  4. R

    Get specific div when clicking button in php while loop

    I have a while loop spitting out multiple post which each has a div button called 'flag_btn', when clicked I am trying to show the corresponding div container for my form all being displayed from a PHP while loop - $sql = "SELECT * FROM table"; $result = $conn->query($sql); if...
  5. W

    Ajax XHR returns 500 error, but the PHP file works

    index.html (returns 500 error when running this ajax request) function checkUnread(username) { $.ajax( { type: "POST", url: "http://www.projecttranslation.org/cvlgbt/www/web/unreadcount.php", data: { user: username }, cache: true, success: function ( data ) {...
  6. S

    How to disable button during ajax request

    So I have a razor form and I want to disable a button during ajax request. Also I want to be able to send only one request to controller - (disable any flood attempt) This is my html: <div class="row"> <div class="col-md-8 col-md-offset-2"> @using...
  7. B

    Display Specific data using Ajax and jquery and html select button

    hello community i need help on this what i really want to do is to select from database using onchange() function through Ajax.then return the result to the client.i used Ajax to send the information to the server side and but i am having problem return it with the where condition //this is the...
  8. K

    jQuery live edit table do ajax update and delete, focusout problem

    I want to use jQuery make a table live edit/update/delete , but now has two problems if click the pen by order #3 to #1 , total 3 clicks, but why click the pen by order #1 to #3 total 5 clicks ? click tick icon action won't fire because input box focusout Full code see the demo here...
  9. R

    How to append ajax result in modal with datatable

    Good day everyone! I am trying to append my ajax result in my datatable inside my modal. I already get the data that I needed but it still shows that data is not available. It shows like this: This is my ajax success which processed the result. success: function(result) {...
  10. B

    Shorthand way of creating html elements from an array of arrays

    Is there a way to make this into something shorter? I have a list of 15 questions and need them to stay in order. after each question is answered it go to a nextQuestion function. I would like to keep that as is. I've tried doing a for loop, but it keeps making the questions come out of order...
  11. F

    How do you put text under Tab header that links with the tab you press?

    I'm new to HTML coding and I want to know how do I put another tab content below the tab header that links to what ever tab I press. I can see the tab content is on top but how do I put the content below the tab too that is linked? P.S. I do not know how to put code below the header how to link...
  12. K

    Remove every character from a string except the numbers and characters between them

    The problem I'm facing is that I'm unable to get number from a string along with dot or comma between those numbers. Example string: 'kr.2.000,00 DKK' OR '$150.65 USD' OR '€340.00 EUR' From this string I need to fetch '2.000,00' using regex. so basically the regex would be to fetch numbers and...
  13. D

    My array is not loading pictures to the html [on hold]

    I believe I have this coded correctly, but I'm not getting the image to show up. Here is the array of questions, answers and the image: var questions = [ question:"Where should choking victims place their hands to indicate to others that they need help?", choices:["A: Over the eyes", "B...
  14. K

    Passing JavaScript to Session variable

    I am trying to pass a variable to a php session variable, so I can access it later from other functions. I might have a totally approach, I'm not sure. What I want to do is to have my vaiable stored somewhere so I can access it anytime and anywhere within a session. This is what I have now...
  15. B

    How do I pass button state and variable onto another page in wordpress?

    I've created a wordpress site, and have 4 buttons displaying different $ amounts. I want to save which of those buttons gets selected. When I click the submit button, I want it to use that number. <h2>Amount </h2> <a href="#" role="button"> $51.00...
  16. B

    How I can use WordPress Media Uploader with Multiple image upload Button

    I'm a beginner in jQuery, Multiple image upload Button implement with WordPress Media Uploader is not working, I need to know how to do the right way. Here's my code: Javascript/jQuery For displaying the media uploader and handling the selected images: jQuery(document).ready( function($){ var...
  17. P

    How to fix navigation bar in wordpress?

    I am working on a theme which has a dynamic menu when we scroll it goes hide. I want to fix it on the top just like w3school website. Any idea? Is it a good option to use a plugin like Sticky menu Here is the website link https://spaceunlimited.in/ CSS .ehf-header #masthead { z-index: 30...
  18. P

    What is the idea behind setting the attributes twice, once in html and then in jquery?

    I am new to javascript and jquery and i was looking at some code and found this to be very prevalent everywhere. <ul class="items"> <li class="item" aria-controls="item-0" role="tab"> </li> <li class="item" aria-controls="item-1" role="tab"> </li> <li class="item" aria-controls="item-2"...
  19. E

    Reloading the page (send form)

    I have a problem with reloading the page. After clicking submit form the page reloads. I click send the form and takes me to http: // localhost: 3000 / mail.php. And I would like the site not to be reloaded. (I use the validation form jquery plugin).This is my code: jquery (function(){...
  20. A

    Django; How to redirect after confirm window

    I'm working on Django project. I'm creating a delete function and I'm wondering how I can redirect to a page with ajax. My current views.py is this. def delete_post(request, pk): if request.method == 'DELETE': post = get_object_or_404(Post, id=pk) post.delete()...
Top