Hi,
I am displaying two columns of checkboxes based on the condition, by iterating thru <logic:iterate>. I can clik any checbox from both columns and if i submit, it works fine. But for some condition, second check box column wont be created. And i can select checkboxes from only one column. But now the problem is, as i am calling javascript function while submitting the form, bcoz of non-existence of second column element, it is failing.
function select() {
var lockArr = new Array(document.selectForm.lock.length);
var unlockArr = new Array
(document.selectForm.unlock.length);
........
...
this is the snap of my code which i call thru onSubmit="javascript:select().....
'lock' and 'unlock' are checkbox name which will be created in <logic:iterate>. For some condition, any one of these two checkboxes wont be created. But i am referring both inside the function. That is problem. Dont know how to solve it?
Need help on this. Thanks & appreciations in advance.
Kannan
-
Javascript Error (2 messages)
- Posted by: Kannan G
- Posted on: July 29 2005 18:01 EDT
Threaded Messages (2)
- Javascript Error by Girish Prasad on August 01 2005 08:01 EDT
- Javascript Error by Kannan G on August 01 2005 09:38 EDT
-
Javascript Error[ Go to top ]
- Posted by: Girish Prasad
- Posted on: August 01 2005 08:01 EDT
- in response to Kannan G
Put the code that access the unlock (the checkbox's which are not created ) in
if(document.selectForm.unlock)
{
..
..
}
. -
Javascript Error[ Go to top ]
- Posted by: Kannan G
- Posted on: August 01 2005 09:38 EDT
- in response to Girish Prasad
Done. Thanksalot Girish.