...

View Full Version : CSS "expression" looping



WebmasterLULZ
05-12-2009, 11:43 AM
Idk wheather to post this in CSS or javascript.

Because this is about a advance CSS tag that exucutes javascript.

Anyway,

For this test I am doing I did
#divName{ width:expression(alert(1)); }

However, it kept on alerting 1 over and over again.

Is there a way to make the "expression( " CSS to run a javscript function without looping itself?

barkermn01
05-12-2009, 11:47 AM
Idk wheather to post this in CSS or javascript.

Because this is about a advance CSS tag that exucutes javascript.

Anyway,

For this test I am doing I did
#divName{ width:expression(alert(1)); }

However, it kept on alerting 1 over and over again.

Is there a way to make the "expression( " CSS to run a javscript function without looping itself?

yea you are telling javascirpt to alert 1 so its alerting 1 try using this
#divName{ width:expression(void(alert(1))); }

you need to stop alert returning true or it will exspect a size for the width
or this might work aswell:


#divName{ width:expression(alert(1);return '0px';); }

shedokan
05-13-2009, 02:24 AM
isn't expressions work only in IE, I suggest you'll use JS and then you can loop easily using for loops, and while loops.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum