strange behaviour in IE7 and setattribute

W

Wolfing

I have a piece of jscript that used to work fine, but seems to be
problematic in IE7:
I have an iframe that I want to turn scrolling off. The section of
code is:
....
iframeElement = document.getElementById ("frameItems");
....
iframeElement.style.width = frameWidth + 'px';
iframeElement.setAttribute('scrolling','off');
//alert('test');
....


The thing is, when I run it the first time, the scrollbars are not
removed. When I run it the second time and on, it does remove the
scrollbars.
If I uncomment the alert, it does remove it (i.e. without the alert it
doesn't, with the alert it does ???)

Anything I'm missing?
 
W

Wolfing

Wolfing said the following on 4/18/2007 4:43 PM:






setAttribute is known to be buggy in IE. How does it behave when you set
it directly?

iframeElement.scrolling = "off"

--
Hmm... tried it but looks like it doesn't even run (I put an alert
before and after it and only the first alert came up)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top