sad69
03-26-2004, 10:52 PM
Hey guys,
I'm having some troubles understanding something, and wondering if it's a bug in IE or what (I don't have netscape at work...).
I have a multipage form that is written in PHP/Javascript, and the Javascript takes advantage of DOM. As far as the PHP is concerned, it is merely there to retain values from page to page using fieldforwarder.php (http://www.zend.com/zend/spotlight/code-gallery-wade7.php#Heading9).
So what fieldforwarder does is creates hidden input fields of the old values from the different pages.
But then I have my actual fields which are not hidden on the same page. So essentially I have two fields with the same name. So on the 'active' field, I assign an id to it so that I can reference it using getElementById().
However, I'm finding that getElementById() will return the hidden field, which is not what I want!
I know this because first of all I'm getting the wrong values from my boxes. Secondly, when I get the element, I alert element.getAttribute("id") and it comes up blank (because the hidden fields don't have an id).
So.... help?
Thanks,
Sadiq.
I'm having some troubles understanding something, and wondering if it's a bug in IE or what (I don't have netscape at work...).
I have a multipage form that is written in PHP/Javascript, and the Javascript takes advantage of DOM. As far as the PHP is concerned, it is merely there to retain values from page to page using fieldforwarder.php (http://www.zend.com/zend/spotlight/code-gallery-wade7.php#Heading9).
So what fieldforwarder does is creates hidden input fields of the old values from the different pages.
But then I have my actual fields which are not hidden on the same page. So essentially I have two fields with the same name. So on the 'active' field, I assign an id to it so that I can reference it using getElementById().
However, I'm finding that getElementById() will return the hidden field, which is not what I want!
I know this because first of all I'm getting the wrong values from my boxes. Secondly, when I get the element, I alert element.getAttribute("id") and it comes up blank (because the hidden fields don't have an id).
So.... help?
Thanks,
Sadiq.