By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,401 Members | 1,381 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,401 IT Pros & Developers. It's quick & easy.

Hidden Element

P: n/a
Hi All,

I have two types of hidden elements on my form
Type A) the id of the element is static (see below)
<html:hidden name="qtyPlanForm" property="status" styleId="stat01" />
Type B) the id is generated based on the for() loop variable (see
below)
<html:hidden name="qtyPlanForm" property="posmId" value='<%="" +
posmVO.getId().intValue() %>' styleId='<%="pid" + i + "" + j%>'/>
When I do a document.getElementById() for Type A hidden element, I
get
an object, however if I try the same for Type B hidden element I get
null.
Please advise in case I am doing something incorrectly
- RoHiT
Jun 27 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ro*************@gmail.com wrote:
I have two types of hidden elements on my form

Type A) the id of the element is static (see below)

<html:hidden name="qtyPlanForm" property="status" styleId="stat01" />

Type B) the id is generated based on the for() loop variable (see
below)

<html:hidden name="qtyPlanForm" property="posmId" value='<%="" +
posmVO.getId().intValue() %>' styleId='<%="pid" + i + "" + j%>'/>

When I do a document.getElementById() for Type A hidden element, I
get an object, however if I try the same for Type B hidden element
I get null.

Please advise in case I am doing something incorrectly
You have posted server-side code for a client-side problem.
Analyzing what your server-side code actually generates for the
client is going to help you in finding your other mistake.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.