• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

passing values from struts2 form to javascript

 
Ranch Hand
Posts: 87
Hibernate Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

we have a textfiled with date and hyperlink edit. The edit hyperlink should be enabled only when the date is between jan 2010 to Dec 2010 or else disabled.

can anyone help me how to check the datereange using <s:if > and also how pass that value to javascript to display an alert msg


Thanks
 
Vallaru smitha
Ranch Hand
Posts: 87
Hibernate Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

sorry, from my below post its not textfiled but its field with date .

the date and the hyperlink with edit are displayed on the screen. The edit should be enable only when date ranges between Jan 2010 to Dec 2010. How can that be achieved.


Any help is greatly appreciated.

Thanks
 
Ranch Hand
Posts: 247
MyEclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi smitha ,

You will have to call a javascript method on Date select that can make the hyperlink disable.

Thanks and regards.
Mohd Raza
 
Vallaru smitha
Ranch Hand
Posts: 87
Hibernate Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

thanks Raza.

I am not able to pass the date from jsp to javascript . Below is how i am displaying the data



Can you please suggest me how to pass the date to javascript

i also tried using compound statements but they are not working.



But its always going to else loop.

Any suggestions...

thanks












 
Raza Mohd
Ranch Hand
Posts: 247
MyEclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi smitha,

put



in Javasript method as parameter and do logical treatment there..

I Guess it will work.
 
Where does a nanny get ground to air missles? Protect this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic