Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    May 2007
    Posts
    93
    Thanks
    4
    Thanked 0 Times in 0 Posts

    submit form to iframe not working with Safari

    I have a simple form that submits a form with an iframe as target. Under firefox, internet explorer and google chrome it works perfectly.

    But with Safari the form isn't submited. The target page will open in the iframe when clicking the submit button but the form isn't submitted.

    Here's the page with the problem: http://www.ni-dieu-ni-maitre.com/tsh...hirt-A10568008

    Try it with firefox: it will work and the product will be added to the basket. But with Safari it doesn't work.

    Please help me ! I'm desperate

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,603
    Thanks
    0
    Thanked 645 Times in 635 Posts
    The target attribute was declared to be obsolete back in 1997. Browsers are no longer required to support it - although they all still do on links. I don't think that they all ever did for forms - particularly brrowsers created since that attribute was deleted from the standards back in 1997.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New Coder
    Join Date
    May 2007
    Posts
    93
    Thanks
    4
    Thanked 0 Times in 0 Posts
    But the target seems to be working with my script. If you try to submit the form, the target page will load in the correct iframe. But the form won't be submitted.

    Well here's my situation: i want to submit a form to an external website without opening the page in the browser. Instead, i am opening a lightbox telling users that the form has been submitted. So the way i found to do it is to submit the form inside an hidden iframe and then detect with javascript if the iframe has finished loading to confirm the form has been sent.
    Any idea what alternative way i could use to submit my form without changing page ?


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •