2

Recently i was trying to create a scrollable edit text in openlaszlo. But for some reason maxlength property is not working. Any idea like why its not working. Is it a bug?.

I am doing it now in an alternate way. Is there any better approach?

<canvas debug="true">
<include href="incubator/scrolledittext.lzx" /> 

<handler name="oninit">
canvas.answer.setAttribute('width',200);

this.answer.setAttribute('maxlength',20);

</handler>


    <scrolledittext  name="answer" x="20" y="20"  >
    <handler name="ontext">
        //this.setAttribute(maxlength,20);  
    Debug.write("greater1",this.text);  
    if(this.text.length > 20){
        var textContent = this.text;
        textContent = textContent.substring(0,20);
        updateText(textContent);
    }

    </handler>  

    <method name="updateText" args="a">
        Debug.write("UpdateText");
        this.setAttribute('text',a);        
    </method>   
    </scrolledittext>
</canvas>
karthick
  • 11,998
  • 6
  • 56
  • 88
  • Do you have some sample code? Which text input class are you using, ? Also, which OpenLaszlo version and run-time are you using? – Kmeixner Sep 20 '12 at 19:47
  • Note: This bug existed in OpenLaszlo 4.0.3 DHTML run-time but is flagged as fixed here: http://jira.openlaszlo.org/jira/browse/LPP-4747 – Kmeixner Sep 20 '12 at 19:57
  • @Kmeixner: I have added a code snippet. I am using 4.9 and swf10 runtime. – karthick Sep 21 '12 at 05:45
  • @Kmeixner:I have added a code snippet. I am using 4.9 and swf10 runtime – karthick Sep 22 '12 at 07:12
  • Based on Andre's comment in the JIRA issue, it should be working in DHTML. Do you see that behavior in the DHTML runtime only? There shouldn't be a problem in SWFx runtimes. Maybe the events have changed for some browsers. Which browsers are causing the problem? – raju-bitter Sep 24 '12 at 12:04
  • @RajuBitter: I checked in firefox and safari windows. – karthick Sep 24 '12 at 12:42

0 Answers0