The setclass()function now works. It was a bug inside
the function.

Note: When I tried the example with following style I
noticed that the background-color was not set. This
might be a bug with IE.

.test {
        background-color:blue;
        border: 2px solid black;
}  

Updates are inside cvs

PS. I don't think you need to include the "." in the
style name. setClass("test") should work just fine.


--
Raymond Irving


--- Daniel Tiru <[EMAIL PROTECTED]> wrote:
> Hi Folks!
> 
> Tried to use setClass('test') on a Template.
> 
> The code i generated in a ioelement page:
> 
> parent.tpLogin = new parent.Template('hej',0,0,0,0);
>
parent.tpLogin.setAnchor({left:0,top:0,bottom:0,right:0});
> parent.tpLogin.setDefaultFieldValue('&nbsp;');
> parent.tpLogin.generate();
> dynapi.document.addChild(parent.tpLogin);
> parent.tpLogin.setClass('.test');
> 
> When i do this, i get a error in the dynlayerbase on
> line 157:
> if(this.css) this.css.className=cn;
> 
> Then i looked up "cn" witch i cant find really in
> the code. So i changed that to 
> if(this.css) this.css.className=c; //c seams
> declared in the file
> 
> After this is done i get no error but aswell the
> style dont seams to be set.
> I tried this code aswell:
> tp = new Template('',0,0,0,0);
> tp.setAnchor({left:0,top:0,bottom:0,right:0});
> tp.setDefaultFieldValue('&nbsp;');
> tp.generate();
> dynapi.document.addChild(tp);
> tp.setClass('.test');
> 
> And this works, but if i try from the ioelement
> page:
> parent.tp.setClass('.test');
> Nothing happend.
> 
> I aswell tried to move the call to the function
> getting the ioelement page:
> <body>
> <script>
>       dynapi.document.insertAllChildren();
>       loadAction('CheckLogin');
> </script>
> </body>
> 
> Ohh well.. i thought it could be something in the
> templatemanager but i tried this aswell in the
> ioelement page:
> parent.test=parent.dynapi.document.addChild(new
> parent.DynLayer('Hej',50,50,50,50,'000000'));
> parent.test.setClass('.test');
> 
> This didnt work either, so my hope is that someone
> could have a look at this... If you dont want to set
> up a ioelement you could probably use a popup.
> Or am i doing something really wrong?
> Regards
> Daniel
> 
> 
>
-------------------------------------------------------
> This SF.Net email sponsored by: Parasoft
> Error proof Web apps, automate testing & more.
> Download & eval WebKing and get a free book.
> www.parasoft.com/bulletproofapps
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
>
http://www.mail-archive.com/[EMAIL PROTECTED]/


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/

Reply via email to