Hello,
I am using SUN RI for JSF. I want to craete button in my jsf.
If i use <h:commandButton/> it create submit button. But i need type button not type submit.
Please help me to create button in JSF using Sun RI
My requirement is i want jquery confirm box on submit button. In my case when i put jquery confirm box then it will show the confirm box when i click submit botton but it not wait for responce i mean ok or cancel, it submit the page.
i am using JSF SUN RI <h:command button , it only craetye submit and reset button
so how should i implement jquery confirm box on jsf submit button.
My requirement is i want jquery confirm box on submit button. In my case when i put jquery confirm box then it will show the confirm box when i click submit botton but it not wait for responce i mean ok or cancel, it submit the page.
i am using JSF SUN RI <h:command button , it only craetye submit and reset button
so how should i implement jquery confirm box on jsf submit button.
A "pure" button can be done in JSF by simply omitting the "action=" attribute. However, it sounds like you do want a submit, just a pre-submit confirmation.
I'm forgetting what little jQuery I know, but in straight JavaScript, you can do things like this:
The onclick attribute expects a boolean expression, and if the expression value (results of the confirm method) are false, the submit to server is suppressed. Canceled, if you prefer.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Thanks For your reply.
yes it work like you said (confirm box of js), but i am using jconfirm of jquery. When i use jquery it is not waiting my action ( conform box display and close automatically) it submit my page. i want if i am using jconfirm of jquery it wait my action either true or false.