Results 1 to 2 of 2

Thread: Filter with Onclick?

  1. #1
    Join Date
    Aug 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Filter with Onclick?

    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

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    1) You can't put double quotes inside double quotes. Use single quotes.
    2) Try something like this:
    Code:
    <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.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •