Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-04-2010, 12:05 PM   PM User | #1
mumra
New to the CF scene

 
Join Date: Oct 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
mumra is an unknown quantity at this point
Question Javascript conflicts, please help.

I'm attempting to reuse a (JA Purity II T3 Framework) Joomla megamenu for an IPB3 custom skin in the same way this guy has done so for his phpBBB3 forum.

eg: http://www.pcadviser.ro - Joomla!
http://www.pcadviser.ro/forum - phpBB3

I think there are clashes between IPB3's embedded <head> Javascript and the mootools/js scripting which causes abnormal behaviour on the website.

Here's where I believe my problem is isolated to

Snippet:
Here's what it looks like in the <head>
Code:
	<head>
		<meta http-equiv="content-type" content="text/html; charset={$this->settings['gb_char_set']}" />
		<title>{$header_items['title']}<if test="pagenumberintitle:|:$header_items['page']"> {$this->lang->words['page_title_page']} {$header_items['page']}</if></title>
		<link rel="shortcut icon" href='<if test="$this->registry->output->isHTTPS">{$this->settings['board_url_https']}<else />{$this->settings['board_url']}</if>/favicon.ico' />
		

<!-- IPB's Javascript -->
<script type='text/javascript'>
			jsDebug = {parse expression="intval($this->settings['_jsDebug'])"}; /* Must come before JS includes */
			USE_RTE = <if test="userte:|:$this->memberData['members_editor_choice'] == 'rte' && $this->memberData['_canUseRTE'] === TRUE">1<else />0</if>;
			inACP   = false;
		</script>
		{parse template="includeCSS" group="global" params="$css"}
		<!--<meta http-equiv="X-UA-Compatible" content="IE=7" />-->
		{parse template="includeMeta" group="global" params="$metaTags"}
		{parse template="includeJS" group="global" params="$jsModules"}
		{parse template="includeFeeds" group="global" params="$documentHeadItems"}
		{parse template="includeRTL" group="global" params=""}		
		{parse template="includeVars" group="global" params=""}
		<script type='text/javascript'>
			Loader.boot();
		</script>
        
        
<!-- JA Mega menu .JS / .CSS attachment -->
          <script type="text/javascript" src="http://localhost/media/system/js/mootools.js"></script>
          <link href="http://localhost/templates/ja_purity_ii/css/menu/mega.css" rel="stylesheet" type="text/css" /><script src="http://localhost/templates/ja_purity_ii/js/menu/mega.js" language="javascript" type="text/javascript"></script> 
               
        
	</head>
And here is the mega menu nav bar code that is linked to the .js and .mootools
Code:
                    <!--JA Mega menu-->
                    		<!-- MAIN NAVIGATION --> 
	<div id="ja-mainnav" class="wrap"> 
<div class="main clearfix"> 
	<div class="ja-megamenu"> 
<ul class="megamenu level0"><li class="mega active first"><a href="http://localhost/" class="mega active first" id="menu1" title="Home"><span class="menu-title">Home</span></a></li><li class="mega haschild"><a href="/index.php?option=com_content&amp;view=article&amp;id=19&amp;Itemid=27" class="mega haschild" id="menu27" title="Joomla! Overview"><span class="menu-title">Joomla! Overview</span></a><div class="childcontent cols1 "> 
<div class="childcontent-inner-wrap"> 
<div class="childcontent-inner clearfix" style="width: 200px;"><div class="megacol column1 first" style="width: 200px;"><ul class="megamenu level1"><li class="mega first"><a href="/index.php?option=com_content&amp;view=article&amp;id=22&amp;Itemid=34" class="mega first" id="menu34" title="What's New in 1.5?"><span class="menu-title">What's New in 1.5?</span></a></li></ul></div></div> 
</div></div></li><li class="mega"><a href="/index.php?option=com_content&amp;view=article&amp;id=5&amp;Itemid=2" class="mega" id="menu2" title="Joomla! License"><span class="menu-title">Joomla! License</span></a></li><li class="mega"><a href="/index.php?option=com_content&amp;view=section&amp;id=4&amp;Itemid=37" class="mega" id="menu37" title="More about Joomla!"><span class="menu-title">More about Joomla!</span></a></li><li class="mega"><a href="/index.php?option=com_content&amp;view=section&amp;id=3&amp;Itemid=41" class="mega" id="menu41" title="FAQ"><span class="menu-title">FAQ</span></a></li><li class="mega"><a href="/index.php?option=com_content&amp;view=category&amp;layout=blog&amp;id=1&amp;Itemid=50" class="mega" id="menu50" title="The News"><span class="menu-title">The News</span></a></li><li class="mega"><a href="/index.php?option=com_weblinks&amp;view=categories&amp;Itemid=48" class="mega" id="menu48" title="Web Links"><span class="menu-title">Web Links</span></a></li><li class="mega last"><a href="/index.php?option=com_newsfeeds&amp;view=categories&amp;Itemid=49" class="mega last" id="menu49" title="News Feeds"><span class="menu-title">News Feeds</span></a></li></ul> 
</div>			<script type="text/javascript"> 
			var megamenu = new jaMegaMenuMoo ('ja-mainnav', {
				'bgopacity': 0, 
				'delayHide': 1000, 
				'slide': 1, 
				'fading': 0,
				'direction':'down',
				'action':'mouseover',
				'tips': false,
				'duration': 200,
				'hidestyle': 'fastwhenshow'
			});			
			</script> 
			</div> 
</div> 

	<!-- //MAIN NAVIGATION -->
                    <!--Ja mega menu-->

Is there anyone out there that would be able to help me stop the Javascript conflict that's created between IPB and JA-T3's scripts?

My files (zipped) which contain:
the .js
the .mootools
my ipb3 index.html that I'm working with.

NB: Here's the entire purity II joomla setup (if it's needed to make finding the solution easier. It contains the other various CSS files that are used by the megamenu nav) I dont think this should be needed for the solution, but here it is just in case

Many thanks in advance.
mumra is offline   Reply With Quote
Old 04-05-2010, 09:56 AM   PM User | #2
bracegirdley
New to the CF scene

 
Join Date: Apr 2010
Location: USA
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
bracegirdley is an unknown quantity at this point
JavaScript programming

Ok I have 0 javascript knowledge and I am beyond confused with it. I am to make a very basic JavaScript program that will find the factorial of numbers 1-5 and displays each answer separately on separate lines.

Smoke Assist
bracegirdley is offline   Reply With Quote
Old 04-05-2010, 02:22 PM   PM User | #3
mumra
New to the CF scene

 
Join Date: Oct 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
mumra is an unknown quantity at this point
Question

Quote:
Originally Posted by bracegirdley View Post
Ok I have 0 javascript knowledge and I am beyond confused with it. I am to make a very basic JavaScript program that will find the factorial of numbers 1-5 and displays each answer separately on separate lines.

Smoke Assist
By the sounds of it, you know more than me my friend.

I would be interested to know what you find.
Thank you for posting your comment.
mumra is offline   Reply With Quote
Reply

Bookmarks

Tags
ipb, joomla, jquery, megamenu, mootools

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:44 PM.


Advertisement
Log in to turn off these ads.