Hi All,

I want to access a div inside a JSNI method. This is a famous code
snippet for ticker provided by Mr. Stephen Chapman. I am trying to use
it in a GWT-EXT application.

=================================================================================
public native void startTicker(String content, String tWidth,
            String tHeight, String tColour, boolean moStop, String
fontFamily, int tSpeed)/*-{
        var cps=tSpeed;
        var fsz = parseInt(tHeight) - 4;
        if (document.getElementById) {
            var tick = '<div style="position:relative;width:'+tWidth
+';height:'+tHeight+';overflow:hidden;background-color:'+tColour+'"';
if (moStop) tick += ' onmouseover="cps=0" onmouseout="cps=tSpeed"';
tick +='><div id="mq" style="position:absolute;left:0px;top:0px;font-
family:'+fontFamily+';font-size:'+fsz+'px;white-space:nowrap;"><\/div><
\/div>';
 
[email protected]::setTicker(Ljava/
lang/String;)(tick);
            var mq = document.getElementById("mq");
            mq.style.left=(parseInt(tWidth)+10)+"px";
            mq.innerHTML='<span id="tx">'+content+'<\/span>';
            var aw = document.getElementById("tx").offsetWidth;
            lefttime=setInterval("scrollTicker()",50);
        } else {
            alert("Can't find document");
        }
    }-*/;

==================================================================================

But, the value of var mq is NULL. This works fine in a HTML-JS model.
Am I missing something?

Can someone please help me out solving this problem?

Thanks in your kind interest.

Regards,
Sumved Shami
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to