locked
Form not submitting in Chrome or Safari, but works in Firefox & IE RRS feed

  • Question

  • User-509601008 posted
    <form action="" method="post">

    My forms work perfectly in Firefox & Internet Explorer and correctly submit the information to the appropriate mySQL database, however in Chrome and Safari it's not submitting any information. It seems to be treating the submit button as a link and ignoring all of the code indicating it's a form with required fields as it links to the page without any of the errors that would otherwise occur.

    I haven't found anything online to indicate that my code wouldn't work in Chrome & Safari. Any ideas?

    </form><form action="" method="post">
    <form action="" method="post">
    
    <a href="flatter.cshtml">
    <input type="image" alt="Next" src="files/next.png" BORDER="0"></a>
    </form>
    
    </form>
    Tuesday, January 3, 2012 8:54 PM

Answers

  • User1784393945 posted

    My intention is to submit the current page and then go to the target page. What would be the correct way to do this for all browsers?

    Use Push Button Instead of hyperlink. Because Hyperlink direct Submits the target page. But in case of push button first current page is submitted then target page is submitted or page we are redirecting to.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 4, 2012 4:15 AM
  • User1784393945 posted

    But I haven't been able to find instructions for using an image in place of the standard ugly gray button that differs from my original code. Would you mind telling me how to do that?

    Hi Chaya,

    You can use ImageButton also in your scenario...That works also same... 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 4, 2012 11:16 PM

All replies

  • User1784393945 posted

    Hi there

    a href will submit your flatter.cshtml not your current page.... When we use push button it first submits the current page then taget page.

    Wednesday, January 4, 2012 12:37 AM
  • User-509601008 posted

    Would you mind clarifying because it's working properly in Firefox & IE?

    My intention is to submit the current page and then go to the target page. What would be the correct way to do this for all browsers?

    Wednesday, January 4, 2012 1:42 AM
  • User1784393945 posted

    My intention is to submit the current page and then go to the target page. What would be the correct way to do this for all browsers?

    Use Push Button Instead of hyperlink. Because Hyperlink direct Submits the target page. But in case of push button first current page is submitted then target page is submitted or page we are redirecting to.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 4, 2012 4:15 AM
  • User-509601008 posted

    That worked :-)

    But I haven't been able to find instructions for using an image in place of the standard ugly gray button that differs from my original code. Would you mind telling me how to do that?

    Wednesday, January 4, 2012 10:02 AM
  • User1784393945 posted

    But I haven't been able to find instructions for using an image in place of the standard ugly gray button that differs from my original code. Would you mind telling me how to do that?

    Hi Chaya,

    You can use ImageButton also in your scenario...That works also same... 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 4, 2012 11:16 PM
  • User-509601008 posted

    That worked :-D

    Thank you so much!

    Wednesday, January 4, 2012 11:53 PM
  • User1784393945 posted

    You are Welcome Innocent

    Wednesday, January 4, 2012 11:57 PM
  • User-509601008 posted

    :-D

    Thursday, January 5, 2012 12:21 AM