[ http://jira.magnolia.info/browse/MAGNOLIA-242?page=all ]
Philipp Bracher updated MAGNOLIA-242:
-------------------------------------
Fix Version: 3.0 RC1
(was: 3.0 Beta 1)
> Problem with mandatory check of sample form template
> ----------------------------------------------------
>
> Key: MAGNOLIA-242
> URL: http://jira.magnolia.info/browse/MAGNOLIA-242
> Project: magnolia
> Type: Bug
> Components: samples
> Versions: 2.0 Final
> Environment: Mac OS X, safari
> Reporter: sala
> Assignee: Boris Kraft
> Fix For: 3.0 RC1
> Attachments: form.js.diff
>
>
> Mandatory form check does not work on safari. The problem is the naming of
> the form elements (as "0", "00", "01", "02" and so on - see files
> /templates/jsp/samples/templateForm/paragraphs/edit.jsp and
> /templates/jsp/samples/templateForm/paragraphs/selection.jsp).
> reason:
> ------
> if there is an html code like this:
> <form name="someform" onsubmit="return
> (checkMandatories(this.name,'whatever'));">
> text: <textarea name="01"></textarea><br />
> <input name="02" type="checkbox" value="1">1<br />
> <input type="submit" />
> then, in javascript of safari,
> document.forms["someform"].elements["01"].type
> will return "checkbox" in safari, although the element is in fact a textarea
> - this will mess up the whole mandatory procedure.
> Fix:
> ---
> Safari obviously treats the string "01" as a number and returns the type of
> elements[1] - which is indeed the checkbox. Whether this is a bug in safari
> or not is beyond my knowlegde of the ECMAScript specs. Simple change the
> namings of the form elements to e.g. "element_01" and "element_02" in the
> above mentioned files, and also in the file
> /templates/jsp/samples/templateForm/main.jsp (lines 126 and 127).
> Sala
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------