wood burning stoves*
The moose likes JSP and the fly likes how to fetch values of elements on same page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "how to fetch values of elements on same page" Watch "how to fetch values of elements on same page" New topic
Author

how to fetch values of elements on same page

Nishant Vashisth
Greenhorn

Joined: Jun 27, 2011
Posts: 23
guys i am trying to make a date system
in which when user selects year from a drop down list then according to the year selected the
month drop down list is activated
then if the month selected is a 31 days month then the disabled days drop down is activated with 31 days
or for February with 28 days or 29 days..

so how to get the value of the selection of the year and month on the same jsp page
so can you tell me
Arun Chidam
Ranch Hand

Joined: May 08, 2006
Posts: 79
You can do it either through client side(java script) where you control months and days from the script or from server side where you can redirect to same JSP when user selects a particular month and populate the days as per the month selected, also look into AJAX ideal for loading only partial data.


SCJP 1.4, SCWCD 1.4
Nishant Vashisth
Greenhorn

Joined: Jun 27, 2011
Posts: 23
yes but my course does not has javascript so can you tell me just HTML functions or normal java scriplets !! ???
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61761
    
  67

There are no such things as "HTML functions".

The proper way to do this is with JavaScript on the page, Without that you are forced to re-write the entire page making the changes that are needed.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Nishant Vashisth
Greenhorn

Joined: Jun 27, 2011
Posts: 23
Bear Bibeault wrote:There are no such things as "HTML functions".

The proper way to do this is with JavaScript on the page, Without that you are forced to re-write the entire page making the changes that are needed.


ya my bad. I am not aware with the terms much. :P

still isn't there another way using java but not the javascripts.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61761
    
  67

I repeat:
Bear Bibeault wrote:you are forced to re-write the entire page making the changes that are needed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to fetch values of elements on same page