Gmail the client…. close but no cigar Apple ships faster than expected MacBook Pro
Feb 12

Safari Submit Button Weirdness

Tech Add comments

I have a hard time making sure that Safari bloody works. Don’t get me wrong, I like the browser, but it is frustrating to fight it.

Although it bugs me, I kinda understand where they are coming from, when it comes to buttons and form elements and styling.

Sure, I would like to be able to control the buttons on my site, but Steve Jobs is a smarter man than I, so he wants the Mac buttons to all be aqua…. go for it.

Where it does get on my nerves is when there are strange bugs such as a recent one.

I have a form, yet if you click on the submit button nothing happens.

The form is something like this:

<form method=”post” action=”…” id=”emailform”>
<input name=”email” id=”emailformemail” type=”text” size=”15″ maxlength=”255″ value=”Your email address” /><input type=”submit” id=”emailformsubmit” value=”GO” />
</form>

Pretty simple. I wonder why it isn’t firing?

I attach handlers to the form onsubmit to see if it is ever getting called… and it isn’t. If I type something into the email text box and hit return? it clicks the button, and nothing is called.

I can’t make this thing do anything, until I put something into the onclick handler (and in onclick=”" versus via DOM):

<form method=”post” action=”…” id=”emailform”>
<input name=”email” id=”emailformemail” type=”text” size=”15″ maxlength=”255″ value=”Your email address” /><input type=”submit” id=”emailformsubmit” value=”GO” onclick=”document.getElementById(’emailform’).submit()” />
</form>

So, if I force it… it works. I can’t even find anything on this on Google, (or Quirksmode, or the Webkit bug database) as there probably is something dumb that I haven’t seen (please tell me!).

I have ran across this kind of thing in the past where I had to jump to use <button> and put weird text in between else the styling didn’t work, etc etc.

I hate this hack :(

38 Responses to “Safari Submit Button Weirdness”

  1. Craig S. Cottingham Says:

    You don’t have a “name” attribute in the input element for your submit button. I don’t know that this is the problem, but it’s the first thing I noticed.

  2. Craig S. Cottingham Says:

    So much for that idea. I pasted your non-working HTML into a file with just enough around it to make it valid XHTML, and the submit button seems to work fine.

  3. Thomas Heller Says:

    I fought with some other weirdness the other day. Maybe you have one form inside another form? That totally screwed up both forms for me.

  4. sagun Says:

    sagun raj

  5. sagun Says:

    hi sagun

  6. miles zarathustra Says:

    Got an even worse problem: I put in the onclick, and it still fails! An alert even fails in the in the onclick.

    :-(

  7. law suit levaquin Says:

    thank

  8. Gezer Gamadi Says:

    Are you sure 55808 of this?!?

  9. Mamadshah Says:

    Your site is very interesting http://maturelady.hostmaniacs.com/pill/forum.php

  10. SeanMcGill Says:

    If In the present time the internet craze has swept the nation and these days everything and everyone is online. Everyone having fun on internet and get knowledge from the web site.
    you want to know how to make a free web site, the good news is that you’ve set an easy goal for yourself. Learning how to make a free web site is about more than just getting your web domain for free – you need to know how to put information on that site as well. Many domains offering free web sites also feature free online tutorials that will help you write your web pages. Some sites are so user-friendly; you don’t have to write any of your own web code at all! You can select colors and font sizes from the domain’s own page editing service. When the domain is willing to write your pages for you, it’s very easy to learn how to make a free web site.
    Once you have decided on the topic of your website, it is time to start writing. The text should flow naturally and be divided into easily read paragraphs. Your first objective is to make sure your visitors can easily navigate your website and quickly access your content. According to the web designer point of view If you try hard enough, you can probably come up with some funky style for a page with for example, a new wacky navigational menu. The problem is that everybody expects to see a web page layout follow certain basic rules; navigation sections have to be arranged in a certain way, links have to look a certain way … being consistent makes the web site easier for the visitor to use. Your site should have content that changes frequently, encouraging return visitors.
    And once you know how to make a free web site, you’ll have your own space on the Internet that others can visit. It’s free, it’s easy, and it’s your own piece of the World Wide Web. After all, everyone else is on the Internet – why should you be left behind?

    SeanMcGill

    The author is Business Head for The Web Design Company http://www.webdesigningcompany.net, and is into web-design, development and Search Engine optimization.

  11. SeanMcGill Says:

    If In the present time the internet craze has swept the nation and these days everything and everyone is online. Everyone having fun on internet and get knowledge from the web site.
    you want to know how to make a free web site, the good news is that you’ve set an easy goal for yourself. Learning how to make a free web site is about more than just getting your web domain for free – you need to know how to put information on that site as well. Many domains offering free web sites also feature free online tutorials that will help you write your web pages. Some sites are so user-friendly; you don’t have to write any of your own web code at all! You can select colors and font sizes from the domain’s own page editing service. When the domain is willing to write your pages for you, it’s very easy to learn how to make a free web site.
    Once you have decided on the topic of your website, it is time to start writing. The text should flow naturally and be divided into easily read paragraphs. Your first objective is to make sure your visitors can easily navigate your website and quickly access your content. According to the web designer point of view If you try hard enough, you can probably come up with some funky style for a page with for example, a new wacky navigational menu. The problem is that everybody expects to see a web page layout follow certain basic rules; navigation sections have to be arranged in a certain way, links have to look a certain way … being consistent makes the web site easier for the visitor to use. Your site should have content that changes frequently, encouraging return visitors.
    And once you know how to make a free web site, you’ll have your own space on the Internet that others can visit. It’s free, it’s easy, and it’s your own piece of the World Wide Web. After all, everyone else is on the Internet – why should you be left behind?

    SeanMcGill

    The author is Business Head for The Web Design Company http://www.webdesigningcompany.net, and is into web-design, development and Search Engine optimization.

  12. nav Says:

    this is my comment

  13. Sean McGill Says:

    If In the present time the internet craze has swept the nation and these days everything and everyone is online. Everyone having fun on internet and get knowledge from the web site.
    you want to know how to make a free web site, the good news is that you’ve set an easy goal for yourself. Learning how to make a free web site is about more than just getting your web domain for free – you need to know how to put information on that site as well. Many domains offering free web sites also feature free online tutorials that will help you write your web pages. Some sites are so user-friendly; you don’t have to write any of your own web code at all! You can select colors and font sizes from the domain’s own page editing service. When the domain is willing to write your pages for you, it’s very easy to learn how to make a free web site.
    Once you have decided on the topic of your website, it is time to start writing. The text should flow naturally and be divided into easily read paragraphs. Your first objective is to make sure your visitors can easily navigate your website and quickly access your content. According to the web designer point of view If you try hard enough, you can probably come up with some funky style for a page with for example, a new wacky navigational menu. The problem is that everybody expects to see a web page layout follow certain basic rules; navigation sections have to be arranged in a certain way, links have to look a certain way … being consistent makes the web site easier for the visitor to use. Your site should have content that changes frequently, encouraging return visitors.
    And once you know how to make a free web site, you’ll have your own space on the Internet that others can visit. It’s free, it’s easy, and it’s your own piece of the World Wide Web. After all, everyone else is on the Internet – why should you be left behind?

    Sean McGill

    The author is Business Head for The Web Design Company http://www.webdesigningcompany.net, and is into web-design, development and Search Engine optimization.

  14. Sean McGill Says:

    If In the present time the internet craze has swept the nation and these days everything and everyone is online. Everyone having fun on internet and get knowledge from the web site.
    you want to know how to make a free web site, the good news is that you’ve set an easy goal for yourself. Learning how to make a free web site is about more than just getting your web domain for free – you need to know how to put information on that site as well. Many domains offering free web sites also feature free online tutorials that will help you write your web pages. Some sites are so user-friendly; you don’t have to write any of your own web code at all! You can select colors and font sizes from the domain’s own page editing service. When the domain is willing to write your pages for you, it’s very easy to learn how to make a free web site.
    Once you have decided on the topic of your website, it is time to start writing. The text should flow naturally and be divided into easily read paragraphs. Your first objective is to make sure your visitors can easily navigate your website and quickly access your content. According to the web designer point of view If you try hard enough, you can probably come up with some funky style for a page with for example, a new wacky navigational menu. The problem is that everybody expects to see a web page layout follow certain basic rules; navigation sections have to be arranged in a certain way, links have to look a certain way … being consistent makes the web site easier for the visitor to use. Your site should have content that changes frequently, encouraging return visitors.
    And once you know how to make a free web site, you’ll have your own space on the Internet that others can visit. It’s free, it’s easy, and it’s your own piece of the World Wide Web. After all, everyone else is on the Internet – why should you be left behind?

    Sean McGill

    The author is Business Head for The Web Design Company http://www.webdesigningcompany.net, and is into web-design, development and Search Engine optimization.

  15. Sean McGill Says:

    If In the present time the internet craze has swept the nation and these days everything and everyone is online. Everyone having fun on internet and get knowledge from the web site.
    you want to know how to make a free web site, the good news is that you’ve set an easy goal for yourself. Learning how to make a free web site is about more than just getting your web domain for free – you need to know how to put information on that site as well. Many domains offering free web sites also feature free online tutorials that will help you write your web pages. Some sites are so user-friendly; you don’t have to write any of your own web code at all! You can select colors and font sizes from the domain’s own page editing service. When the domain is willing to write your pages for you, it’s very easy to learn how to make a free web site.
    Once you have decided on the topic of your website, it is time to start writing. The text should flow naturally and be divided into easily read paragraphs. Your first objective is to make sure your visitors can easily navigate your website and quickly access your content. According to the web designer point of view If you try hard enough, you can probably come up with some funky style for a page with for example, a new wacky navigational menu. The problem is that everybody expects to see a web page layout follow certain basic rules; navigation sections have to be arranged in a certain way, links have to look a certain way … being consistent makes the web site easier for the visitor to use. Your site should have content that changes frequently, encouraging return visitors.
    And once you know how to make a free web site, you’ll have your own space on the Internet that others can visit. It’s free, it’s easy, and it’s your own piece of the World Wide Web. After all, everyone else is on the Internet – why should you be left behind?

    Sean McGill

  16. Sean McGill Says:

    If In the present time the internet craze has swept the nation and these days everything and everyone is online. Everyone having fun on internet and get knowledge from the web site.
    you want to know how to make a free web site, the good news is that you’ve set an easy goal for yourself. Learning how to make a free web site is about more than just getting your web domain for free – you need to know how to put information on that site as well. Many domains offering free web sites also feature free online tutorials that will help you write your web pages. Some sites are so user-friendly; you don’t have to write any of your own web code at all! You can select colors and font sizes from the domain’s own page editing service. When the domain is willing to write your pages for you, it’s very easy to learn how to make a free web site.
    Once you have decided on the topic of your website, it is time to start writing. The text should flow naturally and be divided into easily read paragraphs. Your first objective is to make sure your visitors can easily navigate your website and quickly access your content. According to the web designer point of view If you try hard enough, you can probably come up with some funky style for a page with for example, a new wacky navigational menu. The problem is that everybody expects to see a web page layout follow certain basic rules; navigation sections have to be arranged in a certain way, links have to look a certain way … being consistent makes the web site easier for the visitor to use. Your site should have content that changes frequently, encouraging return visitors.
    And once you know how to make a free web site, you’ll have your own space on the Internet that others can visit. It’s free, it’s easy, and it’s your own piece of the World Wide Web. After all, everyone else is on the Internet – why should you be left behind?

    Sean McGill

    The author is Business Head for The Web Design Company http://www.webdesigningcompany.net, and is into web-design, development and Search Engine optimization.

  17. Nick Thompson Says:

    Hi

    I’m getting a very similar problem with this site; http://www.mediabase.org.uk. The problem’s with the search form – try searching for ‘french’ for example)- if you can see what the problem is I’d really appreciate any feedback.

    Weird thing is sometimes it works on Safari, sometimes it doesn’t, and I’m struggling to see a pattern. For example, if you can’t submit from the home page try clicking on the ‘Conch’ logo and it probably works okay from that page!! Aargh!

  18. Adrien Lamothe Says:

    I’m experiencing a similar problem, where Safari won’t even display the submit button! The html is very strait-forward, an uncomplicated form.

    Very strange. I wonder when Safari will properly support plain-vanilla html?

  19. marry.johnsohn Says:

    Blood Seeker Partial

  20. windsor exports Says:

    Exporter situated in Asia’s hub for Light Engineering Goods that includes Tractor Parts and Automobile Spare Parts. Our range includes Spares for lumbardini.

  21. pnssaawu Says:

    Cheerio!
    order valium online [url=ordervalium.mastertopforum.com]order valium online[/url]

  22. pnssaawu Says:

    Cheerio!
    order valium online [url=ordervalium.mastertopforum.com]order valium online[/url]

  23. kdihsjhg Says:

    You’re always welcome.
    order xanax online [url=orderxanax.mastertopforum.com]order xanax online[/url]

  24. myethkyr Says:

    Come and see us again.
    order valium online [url=ordervalium.mastertopforum.com]order valium online[/url]

  25. myethkyr Says:

    Come and see us again.
    order valium online [url=ordervalium.mastertopforum.com]order valium online[/url]

  26. films Says:

    rabbit films

  27. ASJ WEB Technology Says:

    Dollarpaisa is a popular Indian electronic trade & e-commerce portal which connects Indian exporters, importers, manufacturers and suppliers worldwide looking to gain better exposure for their businesses. Since India is one of the fastest growing economies in the world it offers immense opportunities for businesses around the globe and become a part of success of one of the biggest economies in the world.

  28. ASJ WEB Technology Says:

    Dollar paisa B2B e commerce portal can help Indian businessmen change their strategies in which they connect their business and look forward to expand it in a unique manner. With access to comprehensive Indian and International business directories on this business portal one can look forward to come across new business contacts and see their businesses grow for the better. It has got opportunities for everybody ranging from Indian manufacturers to suppliers to buyers to exporters and importers too.

  29. ASJ WEB Technology Says:

    Getting connected with Dollarpaisa can help your business achieve new heights since one can achieve global presence by getting connected to manufacturers, suppliers, exporters, importers and service providers round the world. By getting registered at Dollarpaisa which has emerged as a profitable business portal one can find a place in its Indian and International directories which have a high visibility among Indian and International business communities.

  30. ASJ WEB Technology Says:

    Dollarpaisa electronic trade & e-commerce portal connects you to the business community worldwide. It

  31. revitol Says:

    Revitol

  32. revitol Says:

    Revitol

  33. salmonella Says:

    Your site is very interesting http://salmonella.oddssky.net

  34. Website Design Says:

    Thanks for that

  35. trav Says:

    did you find a solution to this? i’m having the same problem. very simple html, when i click the submit button, it disappears, but the form isn’t submitted.

  36. trav Says:

    ok, if it helps anyone, this doesn’t work…

    … but this does…

    Note the after the <input type=”text”

  37. trav Says:

    Ok, I needed to put a line break between my two inputs for some reason. <br />

  38. designing website Says:

    Well safari is not very useful and the rest of the post is very nice,,.i am a regular user if the Mozilla and i found its one of the best here,,
    your is very helping and i thank you for this!

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: Type in the word 'cricket'