This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to send multiple actions to Action class after disabling JavaScript

 
Raj Chukka
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Pawel Nowacki
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • 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

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic