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?
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
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?
Perhaps you need to ask over on the mootools site. Which IE version you talking about? 6?
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.
It seems to be in the code:
window.onload=function()
If i take that away it still doesn't work but there is no error message.
Can anyone help please?
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.ss
Both 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!
Could it be a doctype issue?
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
Hi Briohny
Did you try:
window.addEvent('domready', function() {
// your init code here
});
instead of window.onload=function() too?