Determining if onBlur occured because of onMouseUp

Javascript coding ..

Moderators: macek, egami, gesf

gbfar
New php-forum User
New php-forum User
Posts: 24
Joined: Tue Aug 16, 2005 10:40 am
Contact:

Determining if onBlur occured because of onMouseUp

Postby gbfar » Mon Sep 11, 2006 8:30 am

Hi everyone,

Is there a way to determine if onBlur event occured because of onMouseUp event? I have several fields and each of these fields have a division which user can click to select a value. Every time user selects a value from the division, it runs the onBlur event first (which is logically correct). Is there anyway I can see if that onBlur happened because of the mouse click so I could run another function before it automatically runs the onBlur event function?

Thanks in advance.

GBFAR

User avatar
gesf
Moderator
Moderator
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden
Contact:

Postby gesf » Mon Sep 11, 2006 4:05 pm

I'm not sure about what you're trying to accomplish. Is the onblur event beeing used !?
gbfar wrote:because of the mouse click so I could run another function before it automatically runs the onBlur event function?
If an onblur event is beeing used, just change its target function or use the onclick or onselect events, depending on the field's type.

gbfar
New php-forum User
New php-forum User
Posts: 24
Joined: Tue Aug 16, 2005 10:40 am
Contact:

Postby gbfar » Thu Sep 14, 2006 5:18 am

Thanks gsef!

And yes the onblur event was used. There were two different functions one each for onblur and onclick to get done the task. I have now combined both functions into one and created a variable to hold true/false value which prevents the function to run for the second time when user clicks on the choices.

Have a great day!

GBFAR

User avatar
gesf
Moderator
Moderator
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden
Contact:

Postby gesf » Thu Sep 14, 2006 10:29 am

;)


Return to “JavaScript”

Who is online

Users browsing this forum: No registered users and 1 guest