>>As a reminder, things must be enclosed in <form> tags because of
>>Safari.
>>
> why is this so?  I develop everything in Safari, it being the most
> generally compliant browser that I know.  control elements seem to work ok
> for me, inside or outside of the form container, as long as I am not
> trying to submit anything to a server script.

Good. Then perhaps they have fixed this in Safari.

My email below is from Aug 2004. At that time the then-current Safari
required that <input > tags be contained inside <form> tags in order for
radio buttons to behave properly. I do not recall if there were other
problems.

Per my other message, the w3c HTML 4.01 spec says that <input> elements to
*not* need to be contained inside <form> tags:

  http://www.w3.org/TR/html4/interact/forms.html#h-17.2


Since HTML 4.01 was the basis of XHTML, I believe that this still applies.


Miguel

---------------------------- Mensaje original ----------------------------
Asunto: Safari radio buttons problem - RESOLVED
De:     "Miguel" <[EMAIL PROTECTED]>
Fecha:  Vie, 13 de Agosto de 2004, 13:59
Para:   [EMAIL PROTECTED]
--------------------------------------------------------------------------

Summary
-------
In order for radio buttons to work properly on Safari OSX, all <input ...>
fields *must* be included within <form> </form> tags.

This applies to the jmolRadioGroup() function that is part of the Jmol.js
JavaScript Library.

One can generally put a <form> tag immediately after the <body> tag and a
</form> tag immediately before the </body> tag and this will eliminate the
problem.

Netscape 4.7* has the same requirement regarding the form/input hierarchy.
Therefore, if you consistently code your pages using the <form> tag then
your pages should operate properly with Safari and with Netscape 4.7


Detail
------
Jaime reported a problem with radio button behavior on Safari. When he
clicked on a non-selected radio button within the group it would lite up
... as it should. However, the previously lit button would remain hilit
... it should turn off.

I have tracked this down as a Safari problem. It doesn't have anything to
do with the Jmol.js library.

For radio button groups to work properly, you *must* enclose your <input
...> statements with <form> tags.

For a demonstration of this go to http://www.jmol.org/safariradio

IE and Mozilla/Netscape 7.* do not have this requirement. Old Netscape
4.7* does have this requirement.

The Jmol.js library cannot output these tags automatically because some
browsers will output a <br /> when they see a <form> tag. Therefore, users
would lose control over layout.

Therefore, I suggest that people get in the habit of coding their pages by
putting a <form> tag immediately after their <body> tag and putting a
</form> tag immediately before their </body> tag.

Other comments:
 - Konqueror may have the same requirement, since Safari is based upon
Konqueror
 - It is not clear to me whether or not this is a violation of the HTML
specification. The fact is that the major browsers do not require it, but
Safari does.
 - Since the major browsers do not require it, many/most html coders will
not do it. Therefore, Safari users will keep having problems with various
web sites indefinately into the future.
 - Anyone who uses safari should consider filing a bug report.


Miguel

-----
Open Source Molecular Visualization
www.jmol.org
[EMAIL PROTECTED]
-----



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to