File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic

How to add year in select

 
Vaishali Paramane
Ranch Hand
Posts: 107
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
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

 
amit punekar
Ranch Hand
Posts: 544
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hello,
document.Register.year.options[selectLength] = newOpt;


There is no form named "Register".

Regards,
Amit
 
Goutam Chowdhury
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thanks

This is working but only it adds 1900 one number.

document.Register.year.options[selectLength ] = newOpt;
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
because selectLenght is never updated with the new length.
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thanks

Now it is working
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please ask new question in new topics.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic