| Author |
How to add year in select
|
Vaishali Paramane
Ranch Hand
Joined: Mar 05, 2007
Posts: 106
|
posted

0
|
Hi this is my first program in javascript.
I want to add year dynamically in select option. I wrote following code but it is not working.
Register.html
|
SCJP, SCJD
Preparing for SCWCD
|
 |
amit punekar
Ranch Hand
Joined: May 14, 2004
Posts: 488
|
posted

0
|
Hello,
document.Register.year.options[selectLength] = newOpt;
There is no form named "Register".
Regards,
Amit
|
 |
Goutam Chowdhury
Ranch Hand
Joined: Jan 20, 2009
Posts: 44
|
posted

0
|
|
|
Thanks And Regards
Goutam Chowdhury (Scjp1.4 86%,SCWCD5 94%)
|
 |
Vaishali Paramane
Ranch Hand
Joined: Mar 05, 2007
Posts: 106
|
posted

0
|
Thanks
This is working but only it adds 1900 one number.
document.Register.year.options[selectLength ] = newOpt;
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
posted

0
|
|
because selectLenght is never updated with the new length.
|
 |
Vaishali Paramane
Ranch Hand
Joined: Mar 05, 2007
Posts: 106
|
posted

0
|
Thanks
Now it is working
|
 |
Vaishali Paramane
Ranch Hand
Joined: Mar 05, 2007
Posts: 106
|
posted

0
|
Now I am having problem when I am using tag library
How to use name attribute to work javascript code?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56233
|
posted

0
|
|
Please ask new question in new topics.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: How to add year in select
|
|
|