I am using valiDationEngin for validating fields. I clicked submit button with empty fields and validation prompts appeared. After entering data, prompts are not closing. Can someone help? Thanks!
Never mind. I found solution myself. I just need to initialize vallidationEngine.
$('form[name=ajaxForm]').validationEngine();
Related
I have a radio group button, on a page, with very simple onChange code (tried with onClick also) which reads:
try{
print("1");
print("2");
}catch(e){
openLogBean.addError(e,this.getParent());
}
There is a partial refresh with id set to the div containing all my page content. The refresh fires as expected, but the code doesn't run. I have worked out, it is because of validation on other fields, as when I turn validation off for these fields, the code runs.
The question is, how can I get this code to run, whilst leaving validation on for the other fields? I've tried setting "Do not validate or update data" and "Process data without validation" set on my radio group where I want to fire the code, but no such luck. Thanks
Seems "Do not validate or update data" does do the trick, I think my application hadn't built properly first few times around. Leaving here for as an answer for anyone else with similar question
EDIT:
As per Paul's comment below "Process data without validation" will update the server-side and should be the one to use.
Good Afternoon!
I have a situation and I don't know how solve it!
I'm using primefaces and I have a fieldSet with several fields and a commandButton called "Save" disabled inside it. So I need to enable the commandButton if any value of any field were modified. I know that there's the "onChange" event, but I have many fields, I would like to know if there's a way to check the whole form, I mean all fields at once, not field by field!
I'm using Primefaces 5.1
PS: If I wrote something wrong please sorry, just ask me and I will try to put it in other words!
Thank you all in advance
I am using Icefaces and I want to clear all my Ice:messages(validation Messages) on click of reset button.I am using type="reset" in my Ice:commandButton without any actionListener.
Can anyone help me plzz..
Thanks in advance !
Either put your messages in the form (this attribute is ment to reset a form) or solve the validation errors and refresh the page.
I am trying to implement a simple trick which would hide span/label inside textbox when user starts entering text in respective textbox, and show it, on blur if textbox is empty.
(It is implemented on user sign in form)
This thing is working okay so far and here is the demo
But it fails in following scenario:
1) If user enters username, previously entered username list (the form data stored by browser when auto-complete is turned off) appears. And if user selects username with mouse-click from the list, password field gets auto-populated. Now though password field has value in it, it won't hide the span.
(keydown/focus/click/change event over textbox not helping in this case)
2) When the username/password is wrong, page reloads, username textbox has last entered value. But still the span over it is being displayed.
(I tried to check if username textbox is empty on pageload. It didn't work)
Can anyone help me fix these things?
Thanks in advance... :)
What you need i s a placholder. Placeholder have been standardized by html5
and can be easily implemented via various jquery plugin (here is one).
i suggest you use those solutions, as they are standards. the ideal solution is to use html5 and than fallback to javascript for older browsers.
Look ath this form where i implemented placholders: http://www.consiglio.regione.lombardia.it/web/crl/BancheDati/atti_si
When you insert a letter in an input field, the text disappears. It's done with the help of that plugin.
It seems that you are attempting to reinvent the wheel here. Check this already answered question on what appears to be the same subject:
how do I make an html text box show a hint when empty
Usability-wise, I don't think it would be terrible to hide the watermarks of both inputs regardless of which on was clicked/keydowned etc. Now this next option is controversial, so you have been warned...
<input name="first_name" type="text" autocomplete="off">
Just wanted to make sure you were aware of that - most often used to prevent credit card fields from autocompleting. Hope something in here this helps.
I have linkbutton that has the onclick event handler. The control is disabled as soon the user clicks but certain users are able to click multiple times.
Not able to reproduce. Could it depend on the browser?
Please help with any ideas
I'm sorry for commenting on this by way of answer field, but I have no other way to do so.
You will need to be a little more specific about the case; could you include the code fragment where the bug seems to occur?