|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
We have defined a text box
<input type=text name=from[] id=from[] onfocus="showCalendarControl(this);"> But for Javascript validation alert(document.leaveEntryForm.from[i].value); is not working. Some one help? |
|
#2
|
|||
|
|||
|
well without seeing further code we can't really say, what I have noticed is that you defined the textbox with the id from[], but on the alert you are using from[i]. So its looking for a textbox with that ID instead?
__________________
~~==~~ Whoever said nothing is impossible never tried pushing a revolving door ~~==~~ |
|
#3
|
|||
|
|||
|
function validation()
{ var count,i; <?php echo("count = $count;"); ?> for(i=0;i<count;i++) { if((document.leaveEntryForm.from[i].value!="") && (document.leaveEntryForm.to[i].value!="")) { if(document.leaveEntryForm.type[i].value=='select') { alert("Please select the leave type"); return false; } if(document.leaveEntryForm.joinDate[i].value=='') { alert("Please enter the Rejoin Date"); return false; } if(document.leaveEntryForm.days[i].value=="") { alert("Please enter days of leave"); return false; } } } Not able to retrieve the values document.leaveEntryForm.from[i].value |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Javascript - Not able to retrieve array values in Javascript |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|