:: Forum >> Version 2 >>

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 
0;
secret.setControlText("Secret?");
secret.setEvent("onclick", function() {
    var 
null;
    if( (
i++%2) == 0)
       
= new AW.UI.Input;
   else {
      
= 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).
Thursday, May 11, 2006
any idea guys?
Paulo Cesar Silva Reis (PC from Brazil).
Monday, May 15, 2006



This topic is archived.

Back to support forum

Forum search