|
From: Kevin <ke...@ke...> - 2003-05-23 17:22:48
|
See below.
"Raymond Irving" <xw...@ya...> wrote:
> I've been having fun with the template manager (tm) so
> far. I'm now able to switch between templates while
> still using the existing layers
You've lost me now. I understood the previous 'two lyrs in
a table example' and thought it was very neat.
One idea is that once the template html is set. The actual
template setHTML() can be overloaded to provide a similar
expansion of variables.
Useful for getImage when we don't need a DynLayer child.
var h='<table><tr><td>[@img1]</td<td>[@img2]</td>...
var f=dynapi.functions;
var img1=f.getImage('images/img1.jpg',10,10);
var img2=f.getImage('images/img2.jpg',10,10);
var tp = new Template(h,100,100);
tp.setHTML(img1.getHTML(),'img1');
tp.setHTML(img2.getHTML(),'img2');
or something like that.
> for exmaple:
>
> tp.setHTML('Your name is: [@lyr]')
> tp.addChild(new DynLayer('Mary Jones'),'lyr');
> ....
> ....
> tp.setHTML('Click here to access [@lyr] profile')
> // displays Click here to access Mary Jones profile
Could you show the above as a complete example?
> Users will also be able to do:
>
> tp.setField('lyr','text')
> row=tp.getFieldBlock('rows')
> row.setField('c1','2030');
> row.setField('c2','Apple');
Could you show the above as a complete example?
Have I missed a dynapi extention that defines setField()
and getFieldBlock()?
> The attached Text2Var converter will help you convert
> your html templates to javascript
Yes this was a nice tool.
-
Kevin
>
> --
> Raymond Irving
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
|