0

position not updating

I have created a textbox and it's vOffset is updated on some condition. Following is the code:
---
var heading = new KONtx.element.Text({
id:'myHeading',
label: 'StockData',
styles: $news.styles.main.heading_txt,
}).appendTo(this);

if(KONtx.messages.fetch("noImage")=="true"){
log("before "+$("myHeading").config.styles.vOffset);
$("myHeading").config.styles=$news.styles.main.heading_txt1;
log("after "+$("myHeading").config.styles.vOffset);
}
---

The problem is that the value is $("myHeading").config.styles.vOffset is updated based on the condition but it is not updating it on the screen.
Any idea what should I do to make it work.

by
1 Reply
  • QUOTE (Jaya @ May 27 2009, 03:34 AM) <{POST_SNAPBACK}>
    I have created a textbox and it's vOffset is updated on some condition. Following is the code:
    ---
    var heading = new KONtx.element.Text({
    id:'myHeading',
    label: 'StockData',
    styles: $news.styles.main.heading_txt,
    }).appendTo(this);

    if(KONtx.messages.fetch("noImage")=="true"){
    log("before "+$("myHeading").config.styles.vOffset);
    $("myHeading").config.styles=$news.styles.main.heading_txt1;
    log("after "+$("myHeading").config.styles.vOffset);
    }
    ---

    The problem is that the value is $("myHeading").config.styles.vOffset is updated based on the condition but it is not updating it on the screen.
    Any idea what should I do to make it work.



    <object>.config.styles.vOffset only updates the config, not the object itself. The best method to handle this is to do:

    <object>.setStyles($news.styles.main.heading_txt1);
    0

Recent Posts

in General - Yahoo! TV Widgets