dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Code Conflicts - More than one script on page

  1. #1
    Join Date
    Jul 2013
    Posts
    4

    Code Conflicts - More than one script on page

    Hello,
    I have the following scripts on my webpage. They work fine when I have one or the other on the page. But together, the datepicker and calculator has some sort of conflict and I can't figure out what it is. Please help!

    HTML Code:
    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
    <script type="text/javascript" src="autoSum.js"></script>
    <script>
    $(document).ready(function() {
     $("#datepicker1").datepicker();
     $("#datepicker2").datepicker();
     $("#datepicker3").datepicker();
     $("#datepicker4").datepicker();
     $("#datepicker5").datepicker();
     $("#datepicker6").datepicker();
     $("#datepicker7").datepicker();
     $("#datepicker8").datepicker();
     $("#datepicker9").datepicker();
     $("#datepicker10").datepicker();
     $("#datepicker11").datepicker();
     $("#datepicker12").datepicker();
     $("#datepicker13").datepicker();
     $("#datepicker14").datepicker();
     $("#datepicker15").datepicker();
     $("#datepicker16").datepicker();
     $("#today").datepicker();
    });
    </script>
    
    <link rel="stylesheet" href="jquery.calculator.css">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script src="js/jquery.plugin.js"></script>
    <script src="js/jquery.calculator.js"></script>
    <script>
    $(function () {
     $.calculator.setDefaults({showOn: 'both', buttonImageOnly: true, buttonImage: 'images/Calculator-icon.gif'});
     $('#mile1').calculator();
     $('#mile2').calculator();
     $('#mile3').calculator();
     $('#mile4').calculator();
     $('#mile5').calculator();
     $('#mile6').calculator();
     $('#mile7').calculator();
     $('#mile8').calculator();
     $('#mile9').calculator();
     $('#mile10').calculator();
     $('#mile11').calculator();
     $('#mile12').calculator();
     $('#mile13').calculator();
     $('#mile14').calculator();
     $('#mile15').calculator();
     $('#mile16').calculator();
    });
    </script>
    <script type="text/javascript">
    function updatesum() {
     document.expense.sum.value = 
     (document.expense.total1.value -0) 
     + (document.expense.total2.value -0) 
     + (document.expense.total3.value -0) 
     + (document.expense.total4.value -0) 
     + (document.expense.total5.value -0) 
     + (document.expense.total6.value -0) 
     + (document.expense.total7.value -0) 
     + (document.expense.total8.value -0) 
     + (document.expense.total9.value -0) 
     + (document.expense.total10.value -0) 
     + (document.expense.total11.value -0) 
     + (document.expense.total12.value -0) 
     + (document.expense.total13.value -0) 
     + (document.expense.total14.value -0) 
     + (document.expense.total15.value -0) 
     + (document.expense.total16.value -0);
     }
    </script>

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,507
    Ask in the JavaScript Frameworks (JQuery) forum.
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles