logo
down
shadow

Second time ajax call not working


Second time ajax call not working

By : Alexandre
Date : November 19 2020, 03:59 PM
hope this fix your issue After looking at your video and the jsfiddle, the problem has nothing to do with the button.
If you had opened the console, you would have seen that the problem occurs when setting the options for the HighCharts plugin.
code :
Highcharts.getOptions().colors = Highcharts.map(
    Highcharts.getOptions().colors,

    function (color) {
        console.log(color);
        return {
            radialGradient: {
                cx: 0.5,
                cy: 0.3,
                r: 0.7
            },
            stops: [
                [0, color],
                [
                1,
                Highcharts.Color(color)
                    .brighten(-0.3)
                    .get('rgb')] // darken
                ]
        };
<script>
    $(function(){
    Highcharts.getOptions().colors = Highcharts.map(
        Highcharts.getOptions().colors,

            function (color) {
                console.log(color);
                return {
                    radialGradient: {
                        cx: 0.5,
                        cy: 0.3,
                        r: 0.7
                    },
                    stops: [
                        [0, color],
                        [1, Highcharts.Color(color)
                            .brighten(-0.3)
                            .get('rgb')] // darken
                        ]
                };    
          });
    });
</script>


Share : facebook icon twitter icon
When i call ajax function its working first time only in first ajax call i reload the same div from which i m calling aj

When i call ajax function its working first time only in first ajax call i reload the same div from which i m calling aj


By : sara
Date : March 29 2020, 07:55 AM
it helps some times use:- $(".vote").live("click", function(){
in place of : $(".vote").click(function(){
In onKeyup AJAX call not working first time or back pressing

In onKeyup AJAX call not working first time or back pressing


By : NEWbeeNo.1
Date : March 29 2020, 07:55 AM
This might help you , onkeyup is a javascript event,
CORRECTION
code :
function checkhrsforDate(){
var d = 0;
var date = $('#approveapplieddate').val();
$.ajax({
    url: "datelogic.php",
    type: "post",
    data:{date: date},
    cache: false,
    success:function(htmlData){
        if(htmlData=='')
        {
            d = 0;
        }
        else{
            d = htmlData;
        }
        return d;
    }
});
}
$("#approveappliedhrs").keyup(function(e) {
var approvedate = $('#approvedate').val();
var approveapplieddate = $('#approveapplieddate').val();
appliedhrs = $("#appliedhrs").val();
hrs = parseInt($(this).val());
if ($(this).val().length == 1) {
    checkhrsforDate();
}
});
Why my ajax call only not working on the first time? but working on the next call

Why my ajax call only not working on the first time? but working on the next call


By : Dhruv
Date : March 29 2020, 07:55 AM
wish helps you this is my web API method : , Two changes needed:-
1.Use e.preventDefault();:-
code :
$('#btnSubmit').click(function (e) {
   e.preventDefault();PostData();
});
function PostData() {
   if($.trim($('#CompanyName').val()) != ''){
   //put your complete ajax call code inside it
   }
}
Ajax call not working second time

Ajax call not working second time


By : peter stockel
Date : March 29 2020, 07:55 AM
I wish this help you If you load content dynamically and you want bind actions to them you shouldn't use the .bind(), .click() and .on([action], function(){}) functions. Because these functions can be only bind into elements which rendered at page loading.
So you should use that function:
setInterval not working on ajax call second time

setInterval not working on ajax call second time


By : Steve
Date : March 29 2020, 07:55 AM
it should still fix some issue Change your setIntervalline to bellow.
var myVar = setInterval("refreshChat()", 1000);
Related Posts Related Posts :
  • Bootstrap3 - Removed container-fluid
  • Bootstrap framework not responsive for asp.net webform
  • How to align two inner divs inside outer absolute positioned div that has fixed width in which both divs have the same w
  • Div to ignore html tags
  • Prevent caching and stale content with a static web site
  • Is there a way to change the whole document with one selector in CSS?
  • why cant I click om my navigationbar links?
  • Is there a CSS/HTML way to cut multiple shapes out of the top/bottom of a div?
  • css border around multiple links/images
  • 'No data was received in the uploaded file', but file is not empty
  • How input boxes save previous entries
  • AMP carousel direction change
  • Bootstrap multiple carousel not working on thumbnails click
  • Is there a way to put a permanent space into an input field?
  • Html boxes not displaying properly
  • How can I change a variable in Jekyll _config.yml dynamically?
  • How can I prevent DIVs from overlapping a right floated image?
  • Eclipse and .tml files highlighting not working
  • Footer is not in the bottom of the window, (phonegap jquery mobile app for windows mobile)
  • How to put div over another
  • How to use glyphicons in bootstrap 3.0
  • Wordpress page links not working
  • How Do I Use CSS to Set the Color of An ALink?
  • Webpage doesn't scroll smoothly on screen
  • YouTube iframe, browser looks for file locally
  • html displaying inline image
  • Font acting differently on IE and Firefox
  • Encoding and decoding of the character references
  • An Image Button navigate to another site html/css
  • IE8 "Save Target as ..." won't display for block elements
  • Image hover transition for span - CSS
  • How to apply min and max on textarea?
  • How to draw multiple horizontal lines (Notebook Paper effect) using css?
  • Table Printing Issue: Gaps in top and Bottom Border of th Elements
  • grouping elements with div and applying stylesheet for that group
  • Click <div> to expand, then click again to shrink - Its expanding, just not shrinking
  • CSS - How can I center a <script>'s output?
  • Django's template variable gets interpreted as HTML
  • ngx datatable vertical scroll with rowheight set to auto
  • How to make input text border with CSS when it's OnFocus
  • Anyone know of a calendar web widget for my website I could use?
  • How does Bootstrap manage to use fixed positioning for navbar on iOS?
  • Centered text in fully clickable table cell
  • Compare HTML and HTML5
  • steps of creating webpage in bangla
  • css root element margin
  • What is the point of using absolute positioning in CSS?
  • Responsive solution for long URLs (that exceed the device width)
  • Divs don't collapse as they should - media queries
  • QTreeWidgetItem display html
  • Testing html/css image on local from jfiddle
  • long attribute value of HTML
  • Why my svg picture is truncated at the bottom when embedded in html
  • Display CSS: some divs fixed, some flexible (2)
  • How to append href strings with variables in html with PHP?
  • css - Why is there a big white space between text lines?
  • div image position fixed + scroll
  • Hide specific elements from html using css
  • how to align the arrow in menu item?
  • How do I create a trapezoidal button using CSS?
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org