Have the OnBlur instead of OnChange

Have the OnBlur instead of OnChange

  
Hi!
I have a field calling an action OnChange. But, I would like to have this action called only when the focus is out of the field, and not on every letter the user types within that field.
Is it possible?
Thank you.
Hi Carolina,

On the extended properties of the textbox that the user is writing, add the OnBlur event and click (through JavaScript) on a button (hidden) that will call the OS action to save the textbox content.

If have any further question, let me know.

Best regards,

Rúben Gonçalves
What would the syntax be in the extended properties to click on the hidden button that performs the action, or is there an easier way to call the action without a hidden button?

Thanks,
Cory

First make sure the button has an id property set (ex: MyButton1).
Then the extended property name would be OnBlur, and Value would be "$('" + MyButton1.Id + "').click();"
I can 't seem to get this to work. What I'm trying to do is validate that two email addresses match each other.  If they don't then an if widget displays a warning that says they must match.  It worked with the On Change, but caused some user input difficulties because it would check after every character.  I changed the two input boxes to have extended properties OnBlur and a value of "$('" + CheckMatch.Id + "').click();"
The CheckMatch button is hidden and set to Ajax Submit with a destination of the same action that I previously used.  

If I make the button visible, and click it myself, the warning will come up fine.

Any ideas?  Thanks
Cory
Sorry, my mistake: you are missing a #. That is what indicates an element id. A dot "." would be all elements with a particular css class, for instance. So your instruction should be :

"$('#" + CheckMatch.Id + "').click();"
I'm having issues with this.

if my button is visible it works fine but as soon as i set the visible to False it doesn't work

this is my code

"$('#" + Validate.Id + "').click();"


Debra,
You are using an onblur event on that button which you set as invisible?
How can you have onblur on a button that is not even visible? I'm confused.
i realised that. I've made it visible and set the display:none (I got from a previous post) and it now works a treat
The "Visible" property controls whether or not the button gets put on the screen at all, not the "display" of the button. It's a bit confusing.

J.Ja
Debra,
There's another way of calling an action from an event of an input field, which I personally prefer. You can use a web block widget called "FakeNotifyWidget" which you have to add as a reference from the eSpace RichWidgets.

Give it a try. It might be useful on this or other use cases.
Thanks Tiago I'll give that a try

Same here ... works fine until Visible property is set to false. 

Also tried a link instead of a button, and same result.

Haven't tried the "FakeNotifyWidget" yet. 

Anyone has another (simple) solution to this?

Charley wrote:

Same here ... works fine until Visible property is set to false. 

Also tried a link instead of a button, and same result.

Haven't tried the "FakeNotifyWidget" yet. 

Anyone has another (simple) solution to this?

Set the Visible property to True and add and Extended Property of style with a value of "display:none"

Here is how mine looks:


Cory


Thnx Cory, works!