We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11017
    • 12 Posts
    I have a really strange problem. If I creata a chunk and have a normal link like: <a href="foo">bar</a> it’s all good. But if I try to add some javascript to it it goes berserk, for instance: <a href="javascript:document.foo.submit()">bar</a> or: <a href="javascript:void(0);" onClick="document.bar.submit();">bar</a>

    Do I need to "escape" the javascript-call somehow?

    The problem appears when I hit save from the manager after editing the chunk. The error I get from Apache is:
    Not Acceptable
    An appropriate representation of the requested resource /manager/index.php could not be found on this server.

    I’m running 0.9.5, thanks!
      • 10487 MODX Staff
      • 1,535 Posts
      Hi goddang, that error is caused by the Apache mod_security settings on the webserver - you can check out this page on the MODx wiki for some suggestions on how you can tweak the settings to allow the javascript calls through correctly.

      Hope that helps,
      Garry
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 11017
        • 12 Posts
        Thanks. That did the trick!