RE: [OT] RE: javascript html:fprm and getElementById

2005-06-28 Thread Durham David R Jr Ctr 805 CSPTS/SCE
oops > if (isIE && startNode.nodeName == "FORM" && criteria == "name"){ > if (startNode.attributes['name'].nodeValue == value) { > return startNode; > } > } else { The code above is not needed. It has something to do with an IE problem with Form Nodes an

[OT] RE: javascript html:fprm and getElementById

2005-06-28 Thread Durham David R Jr Ctr 805 CSPTS/SCE
Hopefully this e-mail's format doesn't get butchered too badly, but here's a function that walks down a DOM tree looking for a Node with specific attribute value: /** * startNode is the node to start searching from * criteria is the attribute name * value is the attribute value * ** isIE is a

Re: javascript html:fprm and getElementById

2005-06-27 Thread Frank W. Zammetti
;Struts Users Mailing List" Subject: Re: javascript html:fprm and getElementById getElementById is indeed the "standards-compliant" method... but something which came in a bit late!!! Browser IE 5+ and Netscape 6+ support them... but the earlier version browsers does not

RE: javascript html:fprm and getElementById

2005-06-27 Thread Frank W. Zammetti
Gotcha, thanks for clarifying :) Frank -Original Message- From: "Nitish Kumar"<[EMAIL PROTECTED]> Sent: 6/27/05 2:23:48 AM To: "'Struts Users Mailing List'" Subject: RE: javascript html:fprm and getElementById Sorry for getti

RE: javascript html:fprm and getElementById

2005-06-26 Thread Nitish Kumar
. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 10:40 AM To: user@struts.apache.org Subject: RE: javascript html:fprm and getElementById Remember that getElementById is the "standards-compliant" method, the others are not, IIRC. They of course work too, but when manipu

Re: javascript html:fprm and getElementById

2005-06-26 Thread Nitesh
nt: Monday, June 27, 2005 10:39 AM Subject: RE: javascript html:fprm and getElementById Remember that getElementById is the "standards-compliant" method, the others are not, IIRC. They of course work too, but when manipulating DOM objects, getElementById is supposed to be used, accord

RE: javascript html:fprm and getElementById

2005-06-26 Thread Frank W. Zammetti
sure. I don't think there is as far as object references go anyway, but I could be wrong. Frank -Original Message- From: "Nitish Kumar"<[EMAIL PROTECTED]> Sent: 6/27/05 12:37:42 AM To: "'Struts Users Mailing List'" Subject: RE: javas

Re: javascript html:fprm and getElementById

2005-06-26 Thread Nitesh
Forgot to add that "myform" should be the form name! Nitesh - Original Message - From: "Nitesh" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, June 27, 2005 10:23 AM Subject: Re: javascript html:fprm and getElementById

Re: javascript html:fprm and getElementById

2005-06-26 Thread Nitesh
Try out... function setParam(mode) { document.forms["myform"].action ="<%=(String) request.getAttribute("origin")%"+ mode+ ".do"; document.forms[0].submit(); } HTH Nitesh - Original Message - Hi, I need to change the action of my form on the fly. I use the following javascript: fu

RE: javascript html:fprm and getElementById

2005-06-26 Thread Nitish Kumar
always better to use document.forms[i].action . Thanks and Regards, Nitish Kumar -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 3:05 AM To: Struts Users Mailing List Subject: Re: javascript html:fprm and getElementById Why do you

Re: javascript html:fprm and getElementById

2005-06-26 Thread Frank W. Zammetti
Why do you believe this does not work? I just tried in IE and it worked fine, as I would expect since I do this sort of thing all the time. I would suggest throwing an alert before and after the code setting the action, display what the action of the form is. I did this and it does indeed ch

Re: javascript html:fprm and getElementById

2005-06-26 Thread Wendy Smoak
From: "Arash Bijanzadeh" <[EMAIL PROTECTED]> I need to change the action of my form on the fly. I use the following javascript: ... It works perfect under mozilla but not IE. I think the problem is that IE looks for Id in the name field of form and he couln't find it. If document.forms[0].s