3.2.0

2.5.2 not working as a drop in replacement to 2.5.1

Alex;

I thought 2.5.2 would be a drop in replacement to 2.5.1. When I replace 2.5.1 with 2.5.2 my buttons stop responding. I can click aand see the button depress, but my function does not work. Is the issue with the ID tags fixed?
Richard Noble
August 13,
Alex;

Here is how I'm calling the button function.

<script>
var ViewLeadsbutton = new AW.UI.Button;
ViewLeadsbutton.setControlText("View Leads");
document.write(ViewLeadsbutton);

ViewLeadsbutton.onClick = function(){
if (Password()){if (Level>=1){window.parent.showProgressBar('Loading Leads',1);window.parent.content.location='showattendees.exe';} }

}
</script>
Richard Noble
August 13,
Alex;

Some additional information. The buttons stop working if I set focus to a text field. I'm using IE 7.
Richard Noble
August 14,
Alex;

Here ia a sample of the problem:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ActiveWidgets Examples</title>

<!-- fix box model in firefox/safari/opera -->
<style type="text/css">
.aw-quirks * {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}

body {font: 12px Tahoma}
</style>

<!-- include links to the script and stylesheet files -->
<script src="../../runtime/lib/aw.js" type="text/javascript"></script>
<link href="../../runtime/styles/system/aw.css" rel="stylesheet">

<!-- add image libraries -->
<link href="mini.css" rel="stylesheet">

<!-- change default styles, set control size and position -->
<style type="text/css">

#button {width: 100px}

</style>

</head>
<body>
<h3>Button image</h3>
<p>Use setControlImage(string) method.</p>
<pre> obj.setControlImage("key");</pre>

<!-- insert empty control tag -->
<span id="button"></span>

<p>Back to <a href="index.htm">button examples</a>, <a href="../index.htm">all examples</a></p>


<!-- create control objects -->
<script type="text/javascript">

var obj = new AW.UI.Button;
obj.setId("button");
obj.setControlText("Button");
obj.setControlImage("key");
obj.refresh();


obj.onClick = function(){
this.setControlImage("lock");
};

</script>

<Textarea id="text1" rows=19 cols=40 onblur="Javascript:document.getElementById('text1').focus();"></textarea>

<script language="javascript">
document.getElementById('text1').focus();
</script>


</body>
</html>
Richard Noble
August 14,
This is actually the correct behavior - if the button is denied focus then the click event will not fire (but you can still use mousedown or mouseup).
Alex (ActiveWidgets)
August 14,
Then the button action in 2.5.1 was incorrect? Or was this a refinment?
Richard Noble
August 14,
Yes, I would say that was a bug in 2.5.1 and it is now corrected in 2.5.2. In general if the control is unable to receive focus it should not do anything (all operations are blocked).
Alex (ActiveWidgets)
August 15,
Alex;

The onmouseevent works. Should I remove the onClick event to pervent a possible conflict?
Richard Noble
August 16,

This topic is archived.

See also:


Back to support forum