View Full Version : Filter with Onclick?

08-11-2005, 07:49 AM
My friend had a website once where he had buttons that you could click to make the page change thanks to filters.

the code was something like this...

<button onClick="document.body.style.filter="Fliph()"">Test</buttoN>

of course that one doesn't work... i cant figure out the right combination.. can anyone help me with it? i want a button you can click to flip the current page that they are viewing (the one with the button on it).

thanks for the help

08-11-2005, 09:59 AM
1) You can't put double quotes inside double quotes. Use single quotes.
2) Try something like this:
<button onclick="document.body.filters.item('DXImageTransform.Microsoft.Matrix').M11 = 0 - document.body.filters.item('DXImageTransform.Microsoft.Matrix').M11;
document.body.filters.item('DXImageTransform.Microsoft.Matrix').M12 = 0 - document.body.filters.item('DXImageTransform.Microsoft.Matrix').M12;">Test</button>This was pretty much gleaned from msdn.org, and since I haven't got IE to work with wine yet, I couldn't test it.
3) Don't depend on this, it's IE5.5+ only.