3.2.0

Event "onControlMouseDown" does not fire on AW.UI.Input object (Version 2.0.2)

Hello all,

does anybody have a clue why the "onControlMouseDown" event does not fire on a AW.UI.Input object?

var search_dt = "Enter search string"
  var search = new AW.UI.Input;
  search.setId("search");
  search.setControlText(search_dt);
  search.setControlImage("magnifier");
  search.onControlMouseDown = function () { search.setControlText("") }


The events "onControlMouseOver" and "onControlMouseOut" do work, while "onControlMouseUp" and "onControlMouseDown" do not fire.

Thanks to everybody responding
sysadm
April 14,
Hello all,

any comments, ideas or suggestions on this topic?

Thanks everyone
sysadm
April 20,
Are you sure its not firing? Having you tried debugging it?
Anthony
April 20,
Anthony,

thanks for your reply. I just did some debugging in IE & Mozilla. Apparently, we have an interference between "focus" and "onControlMouseDown".

Inside the "<body>" tag, I put focus on the search object at load time:

<body id=mybody onload="search.focus();">


Hence, at page load the text "Enter search string" is highlighted in blue and the end user can start typing the search string immediately.

In addition I want the template text "Enter search string" to disappear, when the user clicks into that field.

The problem is: The "onControlMouseDown" event does only fire, when the Input object doesn't have focus. Is that a feature or a bug - what do you reckon?

Thank you in advance!
sysadm
April 20,
I suspect that this is something Alex will have to answer. I've only just noticed that you're using version 2.0.2. Not sure if its a bug that's been subsequently fixed. Have you considered upgrading?

One thing I can say is that, with version 2.5.3 at least, an input with control text set will have the control text selected/highlighted when its clicked. Typing into the input will replace the selected/highlighted text.
Anthony
April 20,
Yes, this is a bug in AW 2.0.2. It is fixed in AW 2.5.3. The latest version still has problems with onControlClicked/DoubleClicked events, but onControlMouseDown should work fine.
Alex (ActiveWidgets)
April 20,
Hello Anthony & Alex,

thank you very much for your replies! I really appreciate it.

The problem is: I'd really like to switch to ActiveWidgets 2.5.3 but a changed behaviour is keeping me from doing so:

http://www.activewidgets.com/javascript.forum.24526.9/undesired-sort-behaviour-in-grid.html

Once this has been fixed, I'll use the new version.

Thank you again
sysadm
April 21,

This topic is archived.

See also:


Back to support forum