View Full Version : Two Scripts Not Working Together

05-26-2011, 07:35 PM
Hi there,

I am no expert at Javascript, and I am very much stuck at the moment!

I am running two scripts on my website. One is for a fade in banner, and another is a script I'm using for a "subscribe for updates form". You can view it here: www.upgradeyourglass.ie/dev (The banner does not work at the moment due to the fact that the "subscribe for updates" script works and seems to be stopping the banner.)

Here is what is in the "head" section of my code:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Upgrade Your Glass :: Home</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="nav.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/advanced-slider.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="css/example-html.css" media="screen"/>
<link rel="stylesheet" href="css/template.css" type="text/css" media="screen" title="no title" charset="utf-8" />
<link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css" media="screen" title="no title" charset="utf-8" />

<!--[if IE]><link href="style-ie.css" rel="stylesheet" type="text/css" /><![endif]-->
<!--[if lte IE 6]>
<script src="js/DD_belatedPNG.js" type="text/javascript"></script>


<!--[if IE]><link rel="stylesheet" type="text/css" href="css/advanced-slider2.css" media="screen"/>
<!--[if IE]><script type="text/javascript" src="js/excanvas.compiled.js"></script><![endif]-->

<script type="text/javascript" src="js/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/jquery.advancedSlider.min.js"></script>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>

<script src="js/jquery.validationEngine-en.js" type="text/javascript"></script>
<script src="js/jquery.validationEngine.js" type="text/javascript"></script>

$(document).ready(function() {

// SUCCESS AJAX CALL, replace "success: false," by: success : function() { callSuccessFunction() },
ajaxSubmit: true,
ajaxSubmitFile: "ajaxSubmit.php",
ajaxSubmitMessage: "Thank you for subscribing!",
success : false,
failure : function() {}

<script type="text/javascript">

$('.slider').advancedSlider({xmlSource:'slider.xml', width:924, height:210, effectType:'fade', simpleSlideDirection:'autoHorizontal', slideshow:true, slideshowControls:false, fadeNavigationArrows:false, fadeSlideshowControls:false, lightboxDefaultWidth:924, sliceDelay:10, slideshowDelay:4000, navigationButtons:false});


I'd really appreciate any advice as I am really stuck with this! Thanks so much in advance for any help!! :)


05-26-2011, 08:32 PM
Even if I remove everything else from the page, the slider still doesn't work. That might be because it's a commercial product and I was running it as a local mock-up.

However, even if it did work, it won't once you add:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>

for the form validation routine. You shouldn't need that though, jQuery is already on the page. In fact, I tested it. I removed just the above, and the validation still worked. So get rid of the above.

Now, to get the slider working - If it's not just because I was doing a local mock-up - Do you have an example page where it is working?

05-26-2011, 11:00 PM
Hi John,

I removed that line you suggested and it actually works now! :) Thankyou so much! I really appreciate it! It's working perfectly! :)