Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others!  Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

bayu.probypro

jquery not working in ios Safari Ipad/Iphone

I am working on website that need jquery attached to make my ajax working. but after i implement the ajax, all links are not working on Ipad Safari.

It seems the tap action to the screen not affect anything. but its working for all browsers except ios safari (its working on windows safari)

but after i remove my jquery js, its working normally. but i cant use my ajax. So, is there any idea how this happened?

Or if i can separate production for ipad safari and others? so i can use ajax for non safari and not use ajax for safari browser on ios.

Posted on Apr 22, 2014 10:12 PM

Loading page content

Page content loaded

Carolyn Samit

Apr 23, 2014 3:16 AM in response to bayu.probypro

Better to post in the Developer Forums > Developer Forums: Apple Support Communities

This is the forum for troubleshooting Safari for Mac OS X.

TypeError: $.ajax is not a function in jQuery [Solved]

avatar

Last updated: Mar 2, 2024 Reading time · 2 min

banner

# TypeError: $.ajax is not a function in jQuery

The "$.ajax is not a function" error occurs when loading the slim version of jQuery and trying to use the ajax function.

The ajax function is excluded from the slim jQuery version. To solve the error load the regular jQuery version on your page.

Instead of loading the slim version, load the minified version of jQuery. You can find a link to the CDN by going to the jQuery site .

jQuery regular version

Make sure to add a script that points to the minified version and not the slim one.

Here is a working example of using the ajax function.

Here's the code for the index.js file.

We added an event listener to the button. Every time the button gets clicked it makes a GET request to an API and logs the output to the console

If you load the page and click on the button, you will see the API response printed in your console.

If you still get the error you might be loading the jQuery library twice.

Loading the library twice re-runs the initialization process and causes the error.

You can check if you're loading the scripts correctly by opening your Developer tools by pressing F12 and clicking on the Console tab.

If you see any 404 errors related to loading the jQuery scripts, then the path to the file is incorrect.

# Conclusion

To solve the "$.ajax is not a function" error, add the regular jQuery script to the page and remove the slim version.

The slim jQuery version doesn't include the ajax function.

book cover

Borislav Hadzhiev

Web Developer

buy me a coffee

Copyright © 2024 Borislav Hadzhiev

Bug Tracker

Side navigation, #8484 closed bug (invalid).

Opened March 09, 2011 01:11PM UTC

Closed March 11, 2011 06:03PM UTC

Last modified March 14, 2012 06:32PM UTC

Jquery AJAX call not working on Chrome and Safari

Description

Changed march 09, 2011 02:05pm utc by rwaldron comment:1.

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!

Additionally, test against the jQuery 0 GIT version to ensure the issue still exists.

Changed March 10, 2011 06:41PM UTC by [email protected] comment:2

I seem to have the same problem, however it's kind of hard to attach a test case, since I can not really pin down the problem:

In my Grails Project I'm using a JSONP call to get ads for my search results. It works fine in Firefox, camino, but in chrome and safari the script tag is injected in the head and nothing happens. No errors are thrown and no request seems to be made (according to the built in developer tools). The URL is fine and even working, if I copy and paste it to the url-address bar.

The strangest thing is however it's working for me if I use the exact same scripts, etc. in a static html page and even another JSONP call is working fine altogether.

So maybe this might even be a bug in Webkit-browsers and the way they evaluate the script tags? I don't believe that the Grails framework could have anything to do with it, but thats actually the only difference I could see between the two cases.

Browsers tested: Chrome 11.0.696.0, Safari: 5.0.3

Jquery:1.5.0, 1.5.1, 1.4.3

If you need more information I will try to give you as much help as I can...

Changed March 10, 2011 11:02PM UTC by [email protected] comment:3

shame on me... just figured out that I had adblock enabled which blocked the requests once it was running on the server :((

Changed March 11, 2011 06:03PM UTC by jaubourg comment:4

Changed march 29, 2011 04:51pm utc by anonymous comment:5.

Replying to [ticket:8484 Nishant]:

Had the same problem. It worked on my localhost but not on the server. Firefox worked fine, chrome safari and IE all had issues with any .get .load or .post ajax call in my code.

It turned out that these browsers block any ajax call that is not made locally due to the 'same origin policy'. In other words, if you use an http://.... .com web address it is not going to work, for security reasons (and probably good ones too... firefox should probably block these types of requests as well).

These browsers will only accept local ajax calls, using relative urls. If you need to gather information from another site, a nice workaround is to create a page using php (or whatever server side language you use) that retrieves this information, then perform an ajax call to that page on your own server to use it in your jquery script.

Search code, repositories, users, issues, pull requests...

Provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications

data-ajax=false not working on safari on mac and safari on iphone #2641

@huyang

huyang commented Oct 7, 2011

@toddparker

toddparker commented Oct 7, 2011

Sorry, something went wrong.

@toddparker

toddparker commented Oct 12, 2011

No branches or pull requests

@toddparker

MarketSplash

How To Work With Ajax JQuery In Web Development

Ajax with jQuery has revolutionized the way websites interact with servers, offering smoother user experiences without full page reloads. In this article, we'll guide you through its key components, techniques, and best practices to enhance web performance for developers.

Ajax and jQuery have transformed the landscape of web development, offering smoother user experiences and more efficient data handling. As you navigate through modern web projects, understanding the synergy between these two technologies is crucial. Let's explore their capabilities and how they interplay to enhance web applications.

safari jquery ajax not working

Basics Of Ajax And JQuery

Setting up the environment, making ajax calls using jquery, handling data returned by ajax, error handling and debugging, optimizing ajax performance, frequently asked questions.

Ajax, which stands for Asynchronous JavaScript and XML , allows web pages to update asynchronously by exchanging small amounts of data with the server. This means a web page can partially update without needing to reload the whole page. On the other hand, jQuery is a fast, small, and feature-rich JavaScript library, making tasks like HTML document traversal and manipulation, event handling, and animation much simpler with an easy-to-use API.

Why Use Both Together?

The basic syntax, making a simple request.

Using Ajax with jQuery simplifies the process of sending and retrieving data from the server asynchronously. The combination allows for faster, more responsive web applications. Without reloading the entire page, developers can update specific parts of the page based on user actions or other events.

To make an Ajax request using jQuery, one would typically use the $.ajax() method. Here’s the basic syntax :

In the above code:

  • url : Specifies the server endpoint.
  • type : Represents the HTTP method (GET, POST, etc.).
  • dataType : Specifies the type of data you're expecting from the server, like json.
  • success : A callback function to handle the data if the request succeeds.
  • error : A callback function to handle any errors during the request.

Here’s a simple example of making a GET request to fetch some JSON data:

This example:

  • Makes a GET request to the specified URL.
  • Expects JSON data in return.
  • If successful, logs the data to the console.
  • If an error occurs, it logs the error message.

By leveraging the combination of Ajax and jQuery, developers can make their applications more interactive and user-friendly. The possibilities are vast, from loading new content, submitting forms without a page reload, to fetching data from APIs in real-time.

Before delving into Ajax operations with jQuery, it's essential to ensure that our development environment is correctly set up. It ensures a smoother experience and prevents unnecessary roadblocks.

Including jQuery

Checking jquery installation, preparing for ajax calls.

The first step is to incorporate jQuery into your project. While there are multiple ways to do this, a popular method is via the Content Delivery Network (CDN) . By using a CDN, you can ensure fast delivery and better caching.

  • Links to the minified version of jQuery 3.6.0.
  • Should be placed within the <head> tag or right before the closing </body> tag of your HTML file.

Post-inclusion, it's good practice to check if jQuery has been loaded successfully. A simple way is by testing its version in the browser console.

Upon executing this line in your browser’s developer console:

  • You should see the version number of jQuery you've included.
  • If undefined or an error appears, there may be issues with your jQuery link.

Ensure that your server or API allows Cross-Origin Resource Sharing (CORS) . Without this, your browser might block Ajax requests due to security reasons.

If you’re working with a local server, for instance, using Node.js , you might want to use middleware like cors to handle cross-origin requests.

In this example:

  • The Express server is set up with the CORS middleware.
  • The app.use(cors()); line enables CORS for all incoming requests, ensuring that Ajax calls from different origins are permitted.

With these steps in place, your environment is primed for smooth Ajax interactions using jQuery. Proper setup minimizes unexpected issues and allows you to focus on building the functionality you aim for.

When working with web applications, one often requires real-time data retrieval or sending without reloading the entire page. This is where Ajax steps in, and with jQuery , the process becomes streamlined and much more manageable.

The GET Method

The post method, handling responses, advanced settings.

The most straightforward Ajax request is the GET method, typically used to retrieve data.

  • Fetches data from the specified API URL.
  • Logs the received data to the console.

safari jquery ajax not working

For sending data, such as form inputs, to a server, the POST method is your go-to.

  • We're sending a simple JSON object containing a name and age to the server.
  • The response, possibly a confirmation message or the data processed by the server, is logged to the console.

safari jquery ajax not working

Ajax requests might not always go as planned. Hence, handling both success and error responses is crucial.

  • We utilize the $.ajax( ) method, which offers more flexibility.
  • The success callback handles successful responses, and the error callback manages errors.

While the standard settings cater to most needs, sometimes you'll want to tap into advanced configurations.

Breaking it down:

  • We've added an Authorization header , often required for authenticated API requests.
  • A timeout of 5000 milliseconds ensures that if there's no response in this duration, the request gets aborted.

With jQuery's Ajax methods, fetching or sending data over the web becomes an efficient task. By understanding the different methods and configurations available, you can tailor your requests to fit specific needs and ensure that your web applications remain interactive and user-centric.

Once an Ajax call has been made using jQuery , managing the returned data is the next essential step. Depending on the nature and format of the data, different handling techniques may be required.

Parsing JSON Data

Handling xml data, manipulating dom elements, handling data arrays.

Often, data returned from an API or server will be in JSON format . jQuery makes it straightforward to work with such data.

For the above code:

  • We assume that the returned data contains a user object with a name property.
  • We then log the user's name to the console.

XML is another common format, especially with SOAP-based web services. Here's how you can handle XML data:

  • We make a request for XML data.
  • We then find the first title element in the XML and log its text content.

Often, you'll want to update the user interface based on the received data.

  • Fetches user data from the given endpoint.
  • Updates DOM elements with IDs username and email with the returned data.

Sometimes, APIs return data in the form of arrays. Handling and iterating through them requires a loop.

For this example:

  • We fetch an array of users.
  • We then loop through each user and log their name.

Ajax requests are an essential part of modern web applications. By understanding how to handle and manipulate the data returned by these requests, you can ensure that your applications are dynamic and responsive, adapting in real-time to the ever-changing data landscape.

In the realm of Ajax and jQuery , handling errors efficiently and debugging them promptly can save immense time and prevent unnecessary frustration. Let's delve into the ways you can anticipate, catch, and manage these errors.

Basic Error Handling

Debugging with network tools, catching syntax errors, monitoring request duration, handling server-specific errors.

When making Ajax requests, it's common to encounter issues like network errors or invalid responses. Thankfully, jQuery provides a way to catch these.

From the above code:

  • A successful request logs the data.
  • An error triggers the error function, logging the type of failure.

Browser developer tools offer a Network tab, showing all network requests, including Ajax. It's beneficial to inspect response payloads, headers, and HTTP status codes.

A frequent error source is a syntax issue, especially when manually constructing data payloads or response handling.

For this snippet:

  • We're attempting to parse a JSON response.
  • If there's a syntax error, the catch block logs a descriptive error message.

Slow requests can degrade user experience. Monitoring how long requests take can help optimize performance.

  • We capture the start time before the request.
  • Once the request completes, we calculate and log the duration.

Servers might return specific error codes or messages which provide clues about what went wrong.

With this code:

  • We check for a 401 status, indicating authentication issues.
  • For other errors, we simply log the status code.

Proper error handling and effective debugging techniques are the backbone of reliable web applications. By anticipating potential pitfalls and addressing them head-on, you equip yourself to deliver smooth, uninterrupted experiences to end-users.

Ajax-driven applications offer dynamic content loading, enhancing user experiences. However, to ensure responsiveness and speed, Ajax performance optimization becomes crucial. Here are some strategies and practices to consider.

Limiting Requests

Using caching, reducing data payload, implementing pagination, compressing data.

Excessive requests can strain servers and slow response times. One approach is to batch or group data whenever possible.

  • We retrieve a batch of data in a single request.
  • We then process multiple items from the returned data.

Repeatedly fetching unchanged data is inefficient. Caching can minimize unnecessary requests.

  • The cache property is set to true, indicating that if available, cached data should be used.

Reducing the size of data being transferred can significantly enhance performance. Request only what's needed.

  • We're only requesting specific fields, limiting the amount of data returned.

For large data sets, retrieving everything at once is impractical. Pagination breaks data into manageable chunks.

From this code:

  • We're requesting the second page of data, with a limit of 10 items per page.

Data compression techniques, like gzip , can reduce transfer sizes, making requests faster.

To implement:

  • Ensure your server supports gzip compression.
  • Configure the server to automatically compress outbound data.

Optimizing Ajax performance is an ongoing process. Regularly monitoring your application, understanding the data flow, and updating practices can ensure that users enjoy a seamless and fast experience.

What is Ajax?

Ajax stands for Asynchronous JavaScript and XML. It's a technique that allows web pages to update asynchronously by exchanging data with a server in the background. This means a page can update parts of its content without reloading the whole page.

Is jQuery necessary for Ajax?

No, jQuery is not necessary for implementing Ajax. However, jQuery provides a simplified way to make Ajax calls, making it a popular choice among developers.

Can I use Ajax with JSON instead of XML?

Absolutely. In fact, JSON (JavaScript Object Notation) has become more prevalent than XML for Ajax requests due to its lightweight nature and ease of use in JavaScript.

Are Ajax calls faster than traditional server requests?

Not necessarily. Ajax calls are still server requests, but they can improve the user experience by not requiring a page refresh. However, the actual speed depends on various factors, such as data size and server response time.

What is the difference between synchronous and asynchronous Ajax calls?

Asynchronous Ajax calls don't wait for a response and allow other code to run in the meantime. Synchronous calls block other code execution until they complete. Asynchronous calls are preferred as they provide a non-blocking, more responsive user experience.

Let’s test your knowledge!

What does Ajax stand for?

Subscribe to our newsletter

Subscribe to be notified of new content on marketsplash..

Learning jQuery

  • Intermediate
  • Begin with jQuery
  • Setting up jQuery UI
  • Start with jQuery Mobile
  • jQuery with ASP.NET
  • AngularJS Interview Questions
  • Free ebooks to learn AngularJS
  • Bootstrapping AngularJS
  • All AngularJS articles
  • jQuery Interview Questions
  • 200+ jQuery Plugin Collection
  • Popup window plugin
  • LightBox Plugins
  • Text Effect Plugins
  • Best jQuery Plugins-2013
  • Best jQuery Plugins-2012
  • All Plugins
  • Learn jQuery Mobile
  • jQuery Mobile Plugins

Effortless AJAX: Simplifying Database Operations with jQuery

Welcome to the world of web development where jQuery and AJAX combine to make your data interactions sleek and efficient!

If you're looking to enhance your web applications with dynamic content updates without reloading the page, mastering jQuery's AJAX methods is the way to go.

From fetching data to updating your database, this guide will walk you through the ins and outs of making seamless database operations.

Let’s get the ball rolling with a basic understanding of AJAX and how jQuery makes it easier.

understanding of AJAX

What is AJAX? An Overview

AJAX stands for Asynchronous JavaScript and XML. It’s a web development technique used to create interactive applications where data can be exchanged with the server, and parts of a web page can be updated, without reloading the whole page.

Traditionally, web page interactions required reloading and re-rendering entire pages, but AJAX cuts this down, allowing smoother, faster interactions.

Think of AJAX as the backbone of any modern application that needs real-time capabilities—like live chat features or instant content updates.

AJAX isn’t limited to just XML ; it can work with other data formats like HTML, plain text, and JSON, which has become the most popular due to its lightweight and easy-to-use structure.

The key to AJAX is the XMLHttpRequest object which browsers use to send and receive information from a server asynchronously. This means your web application can continue to function without interruption or slowdowns while it performs server-side requests.

A practical use case of AJAX is in login forms. When a user enters their credentials, AJAX can be used to send this data to the server without reloading the page, check the validity of this information, and provide immediate feedback.

This enhances user experience by providing quick responses and interactive , real-time validations that feel smooth and natural.

Getting Started with jQuery and AJAX

Before diving into the code, make sure jQuery is included in your project. You can link to jQuery through a Content Delivery Network ( CDN ) or host it locally. Once set up, making an AJAX call with jQuery is straightforward.

The $.ajax() method is your Swiss Army knife for AJAX operations, allowing you to specify details like the type of request, the URL to fetch data from, and what to do when the request succeeds or fails.

Here’s a simple example:

    url: 'api/data',

    type: 'GET',

    success: function(response) {

        console.log('Data fetched successfully!', response);

    },

    error: function(error) {

        console.log('Error fetching data', error);

    }

This block of code fetches data from 'api/data' using a GET request and logs the response or error to the console.

CRUD Operations Using jQuery AJAX

CRUD operations form the core of interacting with databases. Here’s how you can handle them with jQuery AJAX:

  • Creating Data (POST): Send data to server-side scripts using the POST method. It's used when you're adding new information to your database.
  • Reading Data (GET): Use the GET method to request and retrieve data from the server. Ideal for fetching records.
  • Updating Data (PUT): Submit updated data to the server. It’s similar to POST but used specifically to update existing data.
  • Deleting Data (DELETE): Remove data from the database using the DELETE method.
  • Each method tweaks the $.ajax() setup slightly, changing the type attribute and potentially adding data to send along with requests.

Handling JSON Responses

Working with JSON data is a daily reality in web development. When your AJAX call fetches data, it's often in JSON format, which JavaScript loves! Using jQuery to parse JSON and update your HTML is efficient and simple.

Imagine you received a JSON response containing user information; you could update the user's profile section dynamically without a page refresh.

Here’s how you might handle the JSON response:

success: function(response) {

    $('#username').text(response.user.name);

    $('#email').text(response.user.email);

This snippet updates the text of HTML elements selected by ID based on the JSON response.

Comparing Database Versioning Tools: Liquibase vs Flyway

Choosing the right database versioning tool is crucial for managing your database schemas effectively. Liquibase and Flyway are two of the leading tools in this space.

Liquibase offers advanced automation capabilities and supports a variety of formats like XML, JSON, and YAML for defining database changes.

Flyway appeals with its more basic functionality, focusing on SQL to manage migrations. Both tools are excellent, but your choice might depend on the specific needs of your project, such as the more basic functionality of Flyway vs Liquibase's advanced automation capabilities .

Liquibase vs flyway

Best Practices for Secure AJAX Calls

Security is paramount, especially when dealing with AJAX calls that interact with databases. Always use HTTPS to encrypt your AJAX requests, ensuring that data cannot be intercepted in transit.

Additionally, sanitize inputs to avoid SQL injection and validate data server-side.

Implement CSRF tokens to protect against cross-site request forgery, ensuring that only legitimate users can make changes.

Sanitize inputs to avoid SQL injection and validate data server-side. Implement CSRF tokens to protect against cross-site request forgery, ensuring that only legitimate users can make changes.

Here are a few more tips to enhance the security of your AJAX calls:

  • Authenticate AJAX Requests : Ensure that all AJAX requests are coming from authenticated users. Use session tokens or JWT (JSON Web Tokens) for maintaining user sessions and authentication these requests.
  • Limit Data Exposure: Be cautious about the amount and type of data you expose via AJAX. Minimize the risk by only sending necessary data and restricting the API endpoints that can be accessed through AJAX.
  • Use Content Security Policy (CSP): Implement CSP headers to reduce the risk of XSS attacks by specifying which domains can be used in various parts of your page, such as scripts, styles, and even AJAX endpoints.
  • Monitor and Log: Keep an eye on AJAX traffic for unusual patterns that might indicate an attack. Log requests that fail security checks to analyze potential threats and adjust your protections.

By adhering to these practices, you can significantly enhance the security of your web applications and protect sensitive data from potential threats.

Common Mistakes and Troubleshooting

Even seasoned developers can run into issues with AJAX calls. Common mistakes include not handling error responses properly, misconfiguring HTTP headers , and dealing with cross-origin request issues.

Use browser developer tools to inspect AJAX requests and responses. Check the console for errors and the network tab to see the request and response details.

This can help you pinpoint where things are going wrong and how to fix them.

Common Mistakes and Troubleshooting

That’s a wrap on simplifying database operations with jQuery and AJAX ! By harnessing the power of these tools, you can make your web applications dynamic, responsive, and robust.

Don’t be afraid to experiment with the code snippets provided and tweak them to better fit your projects. Remember, the web is your playground.

Popular Posts

  • Using jQuery's Data APIs
  • Merging jQuery Deferreds and .animate()
  • A jQuery UI Combobox Under the Hood
  • Quick Tip: Prevent Animation Queue Buildup
  • Working with Events, part 1
  • Improved Animated Scrolling Script for Same-Page Links

Recommended Book

Learning jQuery, Fourth Edition book

What Is This?

Learning jQuery is a multi-author weblog providing jQuery tutorials, demos, and announcements. We have tutorials for all skill levels, and each entry is categorized by level of difficulty.

Support the jQuery Project

If you or your organization have benefitted from the use of jQuery, please consider donating to John Resig and the jQuery project.

  • Cookies and privacy policy
  • Entries (RSS)
  • Comments (RSS)

Creative Commons License

© Copyright 2006–2024 Learning jQuery and participating authors. Written content on this site is under a Creative Commons License. Code examples are under your choice of MIT or GPL license.

Development & Design by Landocs with WordPress

Development by Karl Swedberg . Design by Rex Rainey . Published with WordPress .

  • Use the old theme

Forums » Fixing WordPress » Jquery not working with Safari browser

Jquery not working with Safari browser

' src=

(@darrellwilde)

1 year, 11 months ago

Got an issue with a html form on my site.

So on a desktop in chrome the form submits fine and gives me a thank you pop alert and redirects to a page however on Safari it just clears the form. Not sure if it’s a conflict with something or there is a better way to program the form.

I’m using raw html for the form and code snippets plug-in to put the JavaScript in the head.

' src=

The page I need help with: [ log in to see the link]

' src=

(@kaavyaiyer)

Hi @darrellwilde ,

I wasn’t able to submit the form in both Chrome and Safari browsers. When I submit, it just clears my form. However, a couple of errors are being flagged on submit in the Network tab of Safari’s Developer Tools.

I have uploaded a screenshot of the error here .

You might want to check where these fields are coming from and remove/handle them accordingly.

I hope this helps!

' src=

There is already a JavaScript error when loading the page:

Uncaught TypeError: $(...).datepicker is not a function

You can see this when you open the JavaScript console: https://wordpress.org/support/article/using-your-browser-to-diagnose-javascript-errors/

If this is part of your scripts, you should correct it. It is because of this line:

$( "#datepicker" ).datepicker();

and the reason is that the library for the datepicker is not loaded.

Then I also notice that the page uses a mixture of http:// and https:// . Some browsers will prevent exactly that, causing them to load only parts of the page. Since you seem to have an SSL certificate, I would recommend switching any output to https:// . In the simplest case, you only need to adjust the page URL in the WordPress settings and save the permalinks once. See: https://wordpress.org/support/article/https-for-wordpress/

Possibly both will then also solve the problems with Safari.

@threadi Ok I found the datepicker script and removed it which has resolved the errors in javascript but the form still doesnt work in Safari only Chrome for some reason.

' src=

@kaavyaiyer Are you still getting these errors now i have removed the datepicker issue?

I have no idea where it is getting those extra fields from as they are not embedded on my page.

Unfortunately it still isnt working on Safari for me only chrome on desktop.

I have made a html page just with the javascript and form on and it works. See: https://www.activetalentagency.com/form_test.htm

It just seems to be something in WordPress which is preventing it on Safari and possibly other browsers.

I also see the errors mentioned by @kaavyaiyer and can understand the error he describes. The fields are also in the source code within your form and are added by a JavaScript that is in the HTML code of the page. Here is an excerpt of it:

if ($(form).attr("method") != "get") { $(form).append('<input type="hidden" name="aEyFekStThd" value="BmMx5_J@70z8u" />'); }

Your template does not contain these fields, nor does wordpress itself create them, which is why I suspect that some plugin in your system adds them. Possibly it is an anti-spam protection plugin.

My recommendation would therefore be to deactivate all plugins and see if this changes the situation. If not, you should also change the theme as a test.

@threadi @kaavyaiyer Well guys that was strange…. I disabled all plugins, activated them one by one and the mysterious extra fields disappeared.

I have no idea why… however now the form works for me on all browsers if you can test to make sure id be grateful.

Even if it works now, the strange source code is still included in the page. If your form processing can suddenly handle it, it’s fine – but surprising.

@threadi yes i think some of that source code is from plugins, but as long as it works its ok.

One thing i have noticed is that the search function of my site has stopped working im not sure whether this has been a conflict with the new form.

The fact that the search no longer works could have something to do with this strange script. You should get an overview of which plugin is responsible for what.

I tested your page on both the browsers and the errors are still there and it just clears my form. I think the best approach for troubleshooting, like @threadi mentioned, would be to figure out which plugin is causing the extra fields to be added to your form.

Are you using any plugin for the search feature?

' src=

@kaavyaiyer really? I’ve just tested on chrome safari and edge and all seem to be working for me now.

The only thing I am using for a plug-in to do with search is a live search plugin option.

Nothing else.

I deactivated all plugins and the search still didn’t work for some reason.

The search form cannot be submitted because the jQuery from https://malsup.github.io/jquery.form.js that is included via your code sets an event here that prevents the search form from being submitted.

@threadi even when i have removed this it still doesn’t work.

I can still see it in the source code of the page. Therefore the search still does not work.

My advice would be that you look for someone who can support you directly. Within the framework of the forum this becomes more and more difficult.

  • The topic ‘Jquery not working with Safari browser’ is closed to new replies.
  • In: Fixing WordPress
  • 3 participants
  • Last reply from: darrellwilde
  • Last activity: 1 year, 11 months ago
  • Status: not resolved

Topics with no replies

Non-support topics, resolved topics, unresolved topics.

Ask a question

  • Jira Jira Software
  • Jira Service Desk Jira Service Management
  • Jira Work Management
  • Confluence Confluence
  • Trello Trello

Community resources

  • Announcements
  • Technical support
  • Documentation

Atlassian Community Events

  • Atlassian University
  • groups-icon Welcome Center
  • groups-icon Featured Groups
  • groups-icon Product Groups
  • groups-icon Regional Groups
  • groups-icon Industry Groups
  • groups-icon Community Groups
  • Learning Paths
  • Certifications
  • Courses by Product
  • Live learning
  • Local meet ups
  • Community led conferences

questions

Get product advice from experts

groups

Join a community group

learning

Advance your career with learning paths

kudos

Earn badges and rewards

events

Connect and share ideas at events

  • Jira Software

jQuery ajax post not working, authorization error...

Breno Pimentel Lucena

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

Suggest an answer

People on a hot air balloon lifted by Community discussions

Still have a question?

Get fast answers from people who know.

Was this helpful?

  • authentication

Community showcase

  • Understanding Issue Types in Jira
  • What are Issues in Jira
  • What’s the difference between a kanban board and a Scrum board?
  • New Portfolio Cloud Experience Beta
  • Announcement: Project Level Email Notifications for next-gen projects on JSW/JSD
  • Community Guidelines
  • Privacy policy
  • Notice at Collection
  • Terms of use
  • © 2024 Atlassian

IMAGES

  1. jQuery Tutorial: AJAX Load Content With No Page Refresh

    safari jquery ajax not working

  2. jQuery : jQuery: Traversing AJAX response in Chrome/Safari

    safari jquery ajax not working

  3. asp.net

    safari jquery ajax not working

  4. jQuery ajax complete

    safari jquery ajax not working

  5. asp.net

    safari jquery ajax not working

  6. [Solved] Jquery hover not working after Ajax content is

    safari jquery ajax not working

VIDEO

  1. How to Fix Safari Browser Not Working on iPhone After Update Solved

  2. Preview Hera

  3. How To Fix Safari Not Working On iPhone/iPad

  4. How To Fix Safari Browser Not Working On iOS 16

  5. This Fixes the "Safari Cannot Open Because the Address is Invalid" Error

  6. Tutorial jQuery 30: Peticiones con el método 'ajax'

COMMENTS

  1. JQuery Ajax call often not working on Safari 6

    I found many questions and answers for Not working ajax in Safari but fine in chrome and FireFox. My problem is different from them, because it's fine most of the time (I don't mean it was not fine usually because when I refresh my browser, that may cause my ajax call to work).

  2. Ajax calls not working in safari on IOS 10+ : r/webdev

    Not relevant to your issue, but there's an easier way to do this. In jQuery there are shorthand methods for Ajax operations. In general using these .post and .get methods is better - less code, more clarity. In your case there is a very specific one in .load . content.load(content_href);

  3. jquery not working in ios Safari Ipad/Iph…

    I am working on website that need jquery attached to make my ajax working. but after i implement the ajax, all links are not working on Ipad Safari. It seems the tap action to the screen not affect anything. but its working for all browsers except ios safari (its working on windows safari) but after i remove my jquery js, its working normally ...

  4. [jQuery] Safari AJAX/event issue

    These links should also use the Ajax (and do in other browsers), but they don't work in Safari, it ignores the event and just loads the page normally. (Which is a good fall back, but not what should happen!) The only similar issue I can find in the archive is loading external libaries, but unless I've misread this isn't an external library?

  5. TypeError: $.ajax is not a function in jQuery [Solved]

    To solve the "$.ajax is not a function" error, add the regular jQuery script to the page and remove the slim version. The slim jQuery version doesn't include the ajax function. I wrote a book in which I share everything I know about how to become a better, more efficient programmer. You can use the search field on my Home Page to filter through ...

  6. jQuery Forum

    jQuery Forum

  7. $.ajax not working on a Mac

    Ok, here's the deal. I am working on a website that makes use of the $.ajax function. Everything works great in Windows. I've tested it in Firefox, Safari, IE, Opera, and Chrome with no problems. I pulled up the site in Firefox on my Mac and nothing that $.ajax loads appeared. I clicked around on some other items that would trigger event-based loads. The animation triggered, telling me that ...

  8. Browser Support

    About Browser Support. jQuery is constantly tested with all of its supported browsers via unit tests. However, a web page using jQuery may not work in the same set of browsers if its own code takes advantage of (or falls prey to) browser-specific behaviors. Testing is essential to fully support a browser. Only the most current version of jQuery ...

  9. Jquery AJAX call not working on Chrome and Safari

    Jquery AJAX call not working on Chrome and Safari. Had the same problem. It worked on my localhost but not on the server. Firefox worked fine, chrome safari and IE all had issues with any .get .load or .post ajax call in my code. It turned out that these browsers block any ajax call that is not made locally due to the 'same origin policy'.

  10. AJAX call not working of safari but working on chrome

    this is my jquery ajax code. ... Before safari is not working? Laracasts Elite . Hall of Fame. Snapey. Posted 4 years ago. Laracasts Master. Earned once 1000 Laracasts lessons have been completed. Laracasts Tutor. Earned once your "Best Reply" award count is 100 or more. Laracasts Sensei.

  11. Ajax not working on Safari?

    0. @Kor Nov 28.2009 — # My guess is that it is not the AJAX request's fault. The problems migh be either related on the way you have HTML (or XHTML) coded your document or on the way you have (or JQuery did) inserted the data and the new elements into the DOM tree of your document. It is hard to give you an answer without the whole picture.

  12. why jquery $.ajax success not working in safari mac?

    why jquery $.ajax success not working in safari mac? this is my code, $(window).load(function () {

  13. data-ajax=false not working on safari on mac and safari on iphone

    I have a website m.edgeuniversity.com, it has some wierd behavior under safari, at beginning it works, after a while all the data-ajax=false link takes extreme long time to load. not sure why, but it works under firefox, chrome and android browser.

  14. Ajax request not working in Safari, Chrome

    The server side code is not the problem, it works as expected when called simply by another page and not an ajax request. Strangely, the ajax request works in Firefox and IE, but not in Chrome and Safari.

  15. How To Work With Ajax JQuery In Web Development

    Making Ajax Calls Using JQuery. When working with web applications, one often requires real-time data retrieval or sending without reloading the entire page. This is where Ajax steps in, and with jQuery, the process becomes streamlined and much more manageable. The GET Method; The POST Method; Handling Responses; Advanced Settings; The GET Method

  16. Effortless AJAX: Simplifying Database Operations with jQuery

    Once set up, making an AJAX call with jQuery is straightforward. The $.ajax() method is your Swiss Army knife for AJAX operations, allowing you to specify details like the type of request, the URL to fetch data from, and what to do when the request succeeds or fails. Here's a simple example: $.ajax({ url: 'api/data', type: 'GET',

  17. Jquery not working with Safari browser

    Forums » Fixing WordPress » Jquery not working with Safari browser. Jquery not working with Safari browser. darrellwilde (@darrellwilde) 1 year, 11 months ago. Hey guys. Got an issue with a html form on my site. So on a desktop in chrome the form submits fine and gives me a thank you pop alert and redirects to a page however on Safari it just ...

  18. jQuery ajax + html() not working

    When someone clicks the button it slides up and replace the content with the data received using ajax. On this page there is a link, "Go Back" which will take you back to the default form. This is done by the function "returnToForm".

  19. Solved: jQuery ajax post not working, authorization error

    There are a number of ways to work around this, the two most common ones are: Serve your JavaScript from the remote server, instead of the host server. Make the remote server respond with the correct Cross Origin Resource Sharing ("CORS") headers that will let the browser relax this security policy.

  20. html

    Extraordinarily frustrating. The solution to my problem (which might help others) is the priority of the add_action. add_action ('wp_ajax_ (my handler), array ('class_name', 'static_function'), 1); recalling that the default priority = 10. I was getting a return code of zero and none of my code was being called.

  21. JQuery Ajax post not working on Mac (Safari and Firefox)

    My website has a JQuery dialog with a textarea where the user can type a text and submit. The submit is an ajax request to the server. This is the code: I can see the request on Firebug, so I added and error_log to my code. The result is an empty array. The ajax request works perfectly on Firefox, Chrome and IE on PCs, but it does not work on Mac.