The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> JavaScript Development
|
Help Needed Conflicting Javascript!!!
Discuss Help Needed Conflicting Javascript!!! in the JavaScript Development forum on Dev Shed. Help Needed Conflicting Javascript!!! JavaScript Development forum discussing JavaScript and DHTML, AJAX, and issues such as coding cross-browser JavaScript.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

November 16th, 2012, 11:24 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 7
Time spent in forums: 1 h 31 m 22 sec
Reputation Power: 0
|
|
|
Help Needed Conflicting Javascript!!!
could u guys help me out so i can get these two javascripts to work together
fyi
one is twitter widget
and the other is a disqus comments section
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="SocialStyle.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Classic Culture Social</title>
<link rel="shortcut icon" href="favicon.ico" />
<meta name="Generator" content="Serif WebPlus X6">
<meta name="viewport" content="width=960">
<style type="text/css">
body{margin:0;padding:0;}
</style>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'classicculture'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="(twitter url)widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<body onLoad="disqus_shortname();js,fjs=d ()">
</head>
<body>
<div id= NavBar>
<!-- ***********************************************This is the Nav Bar Section**************************** -->
<body text="#000000" style="background:#ffffff; height:1000px;">
<div style="background-color:transparent;margin-left:auto;margin-right:auto;position:relative;width:960px;height:1000px;">
<a href="(website url)"><img src="WPImages/logo.png"border="0" width="106" height="93" alt="" style="position:absolute;left:20px;top:32px;"></a>
<img src="WPImages/wp03d30836_06.png" border="0" width="150" height="77" alt="" style="position:absolute;left:126px;top:48px;">
<img src="WPImages/NavLine.png" border="0" width="876" height="1" alt="" style="position:absolute;left:42px;top:132px;">
<img src="WPImages/NavLine.png" border="0" width="876" height="1" alt="" style="position:absolute;left:42px;top:133px;">
<div style="position:absolute;left:873px;top:71px;width:64px;height:96px;">
<iframe src= "http://www.facebook.com/plugins/like.php?href=https://www.facebook.com/ClassicCulture&send=false&layout=box_count&show_faces=true&action=like&colorscheme=light&font=&width=64&height=96" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:64px; height:96px;" allowtransparency="true"></iframe></div>
<div align="center">
<map id="map0" name="map0">
<area shape="poly" coords="19,21,22,20,22,2,19,0,3,0,0,2,0,20,2,22,19,22" href="http://www.facebook.com/ClassicCulture" alt="">
</map>
<img src="WPImages/wp950b1082_06.png"border="0" width="22" height="22" alt="" usemap="#map0" style="position:absolute;left:805px;top:110px;">
<map id="map1" name="map1">
<area shape="poly" coords="19,21,22,19,22,3,18,0,3,0,0,2,0,20,3,22,19,22" href="https://twitter.com/classicculture_" alt="">
</map>
<img src="WPImages/TwitIcon.png" border="0" width="22" height="22" alt="" usemap="#map1" style="position:absolute;left:827px;top:110px;">
<map id="map2" name="map2">
<area shape="poly" coords="19,21,21,20,21,3,17,0,17,1,5,1,4,0,1,3,1,20,4,22,19,22" href="http://www.youtube.com/user/ClassicCultureCo" alt="">
</map>
<img src="WPImages/YouTubeIcon.png" border="0" width="22" height="22" alt="" usemap="#map2" style="position:absolute;left:849px;top:110px;">
<a href="team.html"><img src="WPImages/TeamWords.png" border="0" width="52" height="19" title="" alt="Team" style="position:absolute;left:48px;top:147px;"></a>
<a href="social.html"><img src="WPImages/wpf02162a0_06.png" border="0" width="59" height="19" title="" alt="Social" style="position:absolute;left:134px;top:147px;"></a>
<a href="http://classiccultureclothing.com/shop/index.php"><img src="WPImages/wpc0e5f373_06.png" border="0" width="49" height="24" alt="" style="position:absolute;left:230px;top:147px;"></a>
<a href="classiccultureclothing.com/media"><img src="WPImages/MediaWords.png" border="0" width="57" height="19" alt="" style="position:absolute;left:309px;top:147px;"></a>
<a href="contact.html"><img src="WPImages/wp127f61de_06.png" border="0" width="105" height="19" title="" alt="Contact Us" style="position:absolute;left:399px;top:147px;"></a>
<img src="WPImages/NavLine.png" border="0" width="60" height="30" alt="" style="position:absolute;left:132px;top:166px;">
<!-- ***********************************************This is the Nav Bar Section**************************** -->
</div>
<div id="disqus_thread">
<div style="position:absolute; top:200px;left:200px;width:960px;height:1000px;">
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div id="twitter">
<div style= "position:absolute;top:500px;left:400px;width:800px;height:1000px;">
<a class="twitter-timeline" href="https://twitter.com/ClassicCulture_" data-widget-id="269553620247248896">Tweets by @ClassicCulture_</a>
</div>
</body>
|

November 17th, 2012, 06:17 PM
|
 |
JavaScript is not spelt java
|
|
Join Date: Feb 2011
Location: Landan, England
|
|
The second script looks incorrect to me, and perhaps should be:
Code:
<script>(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="(twitter url)widgets.js";fjs.parentNode.insertBefore(js,fjs);}})(document,"script","twitter-wjs");</script>
..unless !function has a special meaning of which I am unaware?!
In the following there should be no space between d and ():
Code:
<body onLoad="disqus_shortname();js,fjs=d ()">
and js, in this code isn't doing anything.
You have two body tags and no closing html tag (that I can see), and lots of unmatched div tags. You should validate your html. And your body tag starts within the head tag - which it shouldn't.
Last edited by AndrewSW : November 17th, 2012 at 06:20 PM.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|