3.2.0

Problem with AW.HTML.DIV

Hi guys... i got a weird thing, look the code down:

<script>
var obj = new AW.HTML.DIV;
var b1 = new AW.UI.Input;
var b2 = new AW.UI.Input;
obj.setContent("first", function() { return b1; });
obj.setContent("second", function() { return "&nbsp;&nbsp;&nbsp;" + b2; });
obj.setContent("secret", function() { return ""; });
obj.setContent("br_now", function() { return "<br>";});

var secret = new AW.UI.Button;
var i = 0;
secret.setControlText("Secret?");
secret.setEvent("onclick", function() {
    var b = null;
    if( (i++%2) == 0)
       b = new AW.UI.Input;
   else {
      b = new AW.HTML.DIV;
      b.setContent("secret_inside", function() { return new AW.UI.Input; });
    }	
   obj.setContent("secret", function() { return b; });
   obj.refresh();
});

document.write(obj);
document.write(secret);
</script>


if i append a INPUT (or any others UI object) works like i want, but if i append a div before (and inside div an object), my first div(obj) inserts a <br> tag, so i got the "secret_inside" content value in new line.

How can i fix it?
tkz.
Paulo Cesar Silva Reis (PC from Brazil).
May 11,
any idea guys?
Paulo Cesar Silva Reis (PC from Brazil).
May 15,

This topic is archived.

See also:


Back to support forum