21294 Posts in 5734 Topics by 2602 members
| Go to End | Next > | |
| Author | Topic: | 1618 Views |
-
Javascript won't work in IE

3 April 2009 at 10:00pm
I want to use this menu: http://www.artviper.eu/mootoolsmenu/
I've placed all the files in my javascript folder and called them via requirements in the page.php file. It works perfectly in Firefox but not IE. Any ideas anyone?
-
Re: Javascript won't work in IE

4 April 2009 at 12:08am
Perhaps you need to ask over on the mootools site. Which IE version you talking about? 6?
-
Re: Javascript won't work in IE

4 April 2009 at 12:24am
IE7. I can get it working normally when i apply the script to a standard HTML page... just can't get it working through Silverstripe.
-
Re: Javascript won't work in IE

4 April 2009 at 1:39am
It seems to be in the code:
window.onload=function()
in one of my javascript filesIf i take that away it still doesn't work but there is no error message.
Can anyone help please?
-
Re: Javascript won't work in IE

4 April 2009 at 3:20am
Ok, i've nearly given up. Can someone just confirm that i'm putting all the right files/scripts in the right places... i'm sure this is an easy solution.
1) Requirements::javascript("mysite/javascript/mootools.js"); - js file source as per mootools website code
Requirements::javascript("mysite/javascript/mootools2.js"); - js code that was embedded in HTML page but has been moved into the javascript folder to keep separate from page.ssBoth of these files are being called from page.php
2) Add menu code to page.ss
<div id="container">
<div id="menu">
<% control Menu(1) %>
<ul style="padding: 0;margin: 0">
<li class="$LinkingMode"><a href="$Link" class="toggler" title="$Title.XML">$MenuTitle</a></li>
</ul>
<% end_control %>
</div>
</div>3) CSS has been added
Is there something else i'm missing? Do i have to put extra code in the actual page.ss file?
Can someone please let me know. It's driving me nuts!
-
Re: Javascript won't work in IE

4 April 2009 at 7:21am
You could test your theory by opening your _config.php file in the mysite/ folder and add this line
ContentNegotiator::disable();
See http://doc.silverstripe.com/doku.php?id=ContentNegotiator
-
Re: Javascript won't work in IE

4 April 2009 at 10:59am
Hi Briohny
Did you try:
window.addEvent('domready', function() {
// your init code here
});instead of window.onload=function() too?
| 1618 Views | ||
| Go to Top | Next > |



