[
https://issues.apache.org/struts/browse/WW-2393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Musachy Barroso resolved WW-2393.
---------------------------------
Resolution: Won't Fix
Closing dojo related tickets as "Won't fix". if you have a patch for this
issue, feel free to attach it and re-open.
> s:submit doesn't work in IE7 when submitting a s:form that contains a
> textfield named "id"
> ------------------------------------------------------------------------------------------
>
> Key: WW-2393
> URL: https://issues.apache.org/struts/browse/WW-2393
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Dojo Tags
> Reporter: Volceri D Avila
> Fix For: Future
>
>
> Using the s:submit tag in order to post data from a s:form that contanis a
> textfield named "id" doesn't in IE7.
> After doing some debug I found a problem in the javascript generated by dojo
> plugin (dojo.js), specifically in the dojo.byId function. There, it looks for
> a form with the given id. At first it works well, but then it checks if the
> id of the found element is the same of the given id. If the form contains a
> textfield with the name "id", the function returns wrond value.
> Here's the dojo source with some comments...
> dojo.byId=function(id,doc){
>
> if((id)&&((typeof id=="string")||(id instanceof String))){
> if(!doc){
> doc=dj_currentDocument;
> }
> var ele=doc.getElementById(id);
>
> //*************
> // If you have a for with a textfield with the name "id" the
> // test (ele.id!=id) always returns false....
> //*************
> if(ele&&(ele.id!=id)&&doc.all){
> ele=null;
> eles=doc.all[id];
>
> if(eles){
> //****************************
> // Here's the problem ... "eles.length" is
> // not the number of forms with the same id, but rather,
> // the number of the inner elements of the form...
> // textfields, for example
> //****************************
> if(eles.length){
> for(var i=0;i<eles.length;i++){
> if(eles[i].id==id){
> ele=eles[i];
> break;
> }
> }
>
> }else{
> ele=eles;
> }
> } }
> return ele; }
> return id; };
> Some pieces of the source I coded:
> <s:form id="formId" theme="ajax" namespace="/ajax" method="post" ...>
> <s:textfield label="Id" name="id" cssClass="textfield"/>
> </s:form>
> the submit button (outer):
> <s:submit formId="formId" targets="list" theme="ajax" .../>
> the s:div
> <s:div id="list" ...></s:div>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.