#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0

    Javascript Helppp, Conflicting Codes


    i have 2 external javascripts and when i load the page
    only the first function works and than when i refresh the page the other one works without the first one
    FYI
    the first function is for a comments section and the second is for a twitter widget
    any ideas??

    <!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="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
    </head>
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    74
    Rep Power
    18
    JavaScript is not Java...
    Have you looked in the console log of Internet Explorer or Firefox development tools?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0
    haha yea i realized that now
    but i got it to work
    with renaming the functions and using the body onload

IMN logo majestic logo threadwatch logo seochat tools logo