Manik Prabhu wrote:

Try like this

        document.getElementById("lzapp").setAttribute("height", 100);
        
It should work now

Regards
Manik

I tried, no error any more and the following js:

 document.getElementById("lzapp").height

gives me "100", however, the display does not change. It's still the same as it's embeded.
BTW, it works fine with IE and Firefox/linux.

BR
Darren Cui Liang

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Darren Cui
Liang
Sent: Wednesday, March 14, 2007 4:21 PM
To: Laszlo-User
Subject: [Laszlo-user] "setAttribute is not a function" --javascript
error

Hi, I am having a strange problem recently. Under FireFox2.0/Windows XP,
I embed a swf object generated by laszlo.  In  the page,  I have  the
following javascript:

 document.lzapp.setAttribute("height", 100)

where "lzapp" is the id of the embeded swf. It worked before, but the
javascript console is telling me "setAttribute is not a function". And I
tried:

 document.lzapp instanceof Element

it gives me "false". Does anyone has any clue to solve the problem or
where can I go for help?  What I want is to set the "height" and "width"

of embeded swf object in javascript.

Thanks in advance!

Darren Cui Liang


Reply via email to