Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 556899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:58:08+00:00 2026-05-13T11:58:08+00:00

I was recently informed that my shopping cart application breaks when viewed in Mobile

  • 0

I was recently informed that my shopping cart application breaks when viewed in Mobile Safari (iPhone, iPod Touch). The “add to cart” forms use the ‘progressive enhancement’ approach to support AJAX updates using jQuery. Some quick testing showed that the functionality indeed works with JavaScript disabled. Everything I’ve read so far indicates that the iPhone does not support the “form.onsubmit” event, which is what I’m currently binding to with jQuery to initiate the AJAX transaction.

Can I make modifications to add iPhone support without doing any browser detection, or serving alternate scripts?

The current form template:

<form method="post" action="" class="my-cart">
    <fieldset>
        ...
        <input type="submit" name="my-button" value="add to cart" />
    </fieldset>
</form>

And the script event:

$('form.my-cart').submit(function(){
    ...
});

I’ve had great success with this in terms of browser support (most browsers support the AJAX/JavaScript, but all others – except iPhone – will fall back to regular form submission, etc.. etc..). I’d like to support AJAX function in the iPhone, however I will settle for bypassing the JavaScript. As is, the iPhone simply does nothing upon clicking the submit button.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:58:08+00:00Added an answer on May 13, 2026 at 11:58 am

    Thanks to both responders. The problem turned out to be a conflict with some other, partially related code. The form itself was working, but the event was not being called because the aforementioned code was somehow preventing the triggering of the submit event.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've recently been informed that I need to define the requirements for the project
Recently I have been informed that it is possible to concatenate integers (and other
Recently I ran into this error in my web application: java.lang.OutOfMemoryError: PermGen space It's
Recently I'm doing some work on RTMP streaming, that is using Flowplayer to integrate
Recently I've noticed that on occasion I do not get a mayorship notification when
Recently I was asked to add an XML API to one of the Symfony
I recently posted a question about a WCF Restful web service that I am
Recently in a project, I had a multiprocessing Process that crashed. A child process
recently I started a small Django project that I developed on a local machine
I recently discovered that the PDFs exported by the Fast Report's PDF export filter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.