struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anupam Sinha (JIRA)" <>
Subject [jira] Created: (WW-2645) Name of the input text element is not rendered in IE 6 or IE 7 but works fine in Firefox
Date Wed, 14 May 2008 14:28:06 GMT
Name of the input text element is not rendered in IE 6 or IE 7 but works fine in Firefox

                 Key: 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://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;

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message