[
https://issues.apache.org/struts/browse/WW-2645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Anupam Sinha updated WW-2645:
-----------------------------
Description:
The code rendered for a datetimepicker in IE does not includes the name of the
element.
Example :
<s:datetimepicker name="startDate" displayFormat="MM/dd/yyyy" />
This renders the following code
<INPUT type=hidden value=2008-04-28 name="" dojoAttachPoint="valueNode"><INPUT
style="VERTICAL-ALIGN: middle; WIDTH: 7em" value=04/28/2008 name=""
__doClobber__="true" dojoAttachPoint="inputNode" autocomplete="off"> <IMG
style="VERTICAL-ALIGN: middle; CURSOR: hand" alt="Select a date"
src="http://xyz/struts/dojo/src/widget/templates/images/dateIcon.gif"
hasbox="2" __doClobber__="true" dojoAttachPoint="buttonNode"
dojoAttachEvent="onclick: onIconClick">
In case of Firefox the name is there in the name attribute of input type text.
Because of this document.formName.elementName does not work.
The workaround for me was to go through the code and get the node and get the
value.
function dateValue(dateElementParent) {
var dateValue = null;
var dateChildNodes =
document.getElementById(dateElementParent).childNodes;
if(dateChildNodes != null) {
for(var ii = 0; ii < dateChildNodes.length; ii++) {
if(dateChildNodes[ii].type == "text") {
dateValue = dateChildNodes[ii].value;
}
}
}
return dateValue;
}
was:
The code rendered for a datetimepicker in IE does not includes the name of the
element.
Example :
<s:datetimepicker name="startDate" displayFormat="MM/dd/yyyy" />
This renders the following code
<INPUT type=hidden value=2008-04-28 name="" dojoAttachPoint="valueNode"><INPUT
style="VERTICAL-ALIGN: middle; WIDTH: 7em" value=04/28/2008 name=""
__doClobber__="true" dojoAttachPoint="inputNode" autocomplete="off"> <IMG
style="VERTICAL-ALIGN: middle; CURSOR: hand" alt="Select a date"
src="http://localhost/Rovrr/struts/dojo/src/widget/templates/images/dateIcon.gif"
hasbox="2" __doClobber__="true" dojoAttachPoint="buttonNode"
dojoAttachEvent="onclick: onIconClick">
In case of Firefox the name is there in the name attribute of input type text.
Because of this document.formName.elementName does not work.
The workaround for me was to go through the code and get the node and get the
value.
function dateValue(dateElementParent) {
var dateValue = null;
var dateChildNodes =
document.getElementById(dateElementParent).childNodes;
if(dateChildNodes != null) {
for(var ii = 0; ii < dateChildNodes.length; ii++) {
if(dateChildNodes[ii].type == "text") {
dateValue = dateChildNodes[ii].value;
}
}
}
return dateValue;
}
> Name of the input text element is not rendered in IE 6 or IE 7 but works fine
> in Firefox
> ----------------------------------------------------------------------------------------
>
> Key: WW-2645
> URL: https://issues.apache.org/struts/browse/WW-2645
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Dojo Tags
> Affects Versions: 2.0.11
> Environment: Windows 2000 Professional, Internet explorer 6 and 7
> Reporter: Anupam Sinha
> Priority: Minor
>
> The code rendered for a datetimepicker in IE does not includes the name of
> the element.
> Example :
> <s:datetimepicker name="startDate" displayFormat="MM/dd/yyyy" />
> This renders the following code
> <INPUT type=hidden value=2008-04-28 name=""
> dojoAttachPoint="valueNode"><INPUT style="VERTICAL-ALIGN: middle; WIDTH: 7em"
> value=04/28/2008 name="" __doClobber__="true" dojoAttachPoint="inputNode"
> autocomplete="off"> <IMG style="VERTICAL-ALIGN: middle; CURSOR: hand"
> alt="Select a date"
> src="http://xyz/struts/dojo/src/widget/templates/images/dateIcon.gif"
> hasbox="2" __doClobber__="true" dojoAttachPoint="buttonNode"
> dojoAttachEvent="onclick: onIconClick">
> In case of Firefox the name is there in the name attribute of input type
> text. Because of this document.formName.elementName does not work.
> The workaround for me was to go through the code and get the node and get the
> value.
> function dateValue(dateElementParent) {
> var dateValue = null;
> var dateChildNodes =
> document.getElementById(dateElementParent).childNodes;
> if(dateChildNodes != null) {
> for(var ii = 0; ii < dateChildNodes.length; ii++) {
> if(dateChildNodes[ii].type == "text") {
> dateValue = dateChildNodes[ii].value;
> }
> }
> }
> return dateValue;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.