• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to send multiple actions to Action class after disabling JavaScript

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have 3 actions (Buttons) in my screen. I have a requirement that we still need to send the request to Action class even after Javascript is disabled

Currently i am doing the following

<html:form method="post" action="a.do">



<%-- Now i have 2 more Buttons --%>
<html:reset value="Reset" ..... onclick = "javascript:clear(form) "/>
<html:submit value="Submit" ..... onclick = "javascript:submitAction()"/>
</html:form>

if the JavaScript is disabled, both the buttons will not work. I want to send them in "action" attribute it self. How do i do that? Can someone help me?

Thanks,
Raj
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I want to send them in "action" attribute it self.



What do you mean by "them" and "action"?
I think you could do submit without JavaScript?

If you want to check if JavaScript is enabled/disabled in JSP there is one idea:
Put hidden field with value="false". You can name it javaScriptEnabled. Now, write some JavaScript function and try to change the value of this hidden field to "true".
If JavaScript is enabled it will work and change value to true, if not - value remains as false. I think you could put it on your initial jsp or somewhere before this jsp - then you could for example put this value in session.

Mind, this should be tested first if it works like I think it is

 
permaculture is a more symbiotic relationship with nature so I can be even lazier. Read tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic