Skip to main content

IE 7 expected identifier, string or number



Im having a problem and cant seem to find it for the life of me because my code works in all other browsers except IE7. This is the error im getting "expected identifier, string or number"





This is my code.







function calculate() {

var principal = document.loandata.principal.value;

var interest = document.loandata.interest.value / 100 / 12;

var payments = document.loandata.years.value * 12;



var x = Math.pow(1 + interest, payments);

var monthly = (principal*x*interest)/(x-1);



if (!isNaN(monthly) &&

(monthly != Number.POSITIVE_INFINITY) &&

(monthly != Number.NEGATIVE_INFINITY)) {



document.loandata.payment.value = round(monthly);

document.loandata.total.value = round(monthly * payments);

document.loandata.totalinterest.value =

round((monthly * payments) - principal);

} else {

document.loandata.payment.value = "";

document.loandata.total.value = "";

document.loandata.totalinterest.value = "";

}

}



function round(x) {

return Math.round(x*100)/100;

}



jQuery(document).ready(function ($) {

$('#button').click(function(){

$('#option2').animate({

height: '365px', }, 500 );

});

});







But the problem seem to be where I have my animate function which is...







jQuery(document).ready(function ($) {

$('#button').click(function(){

$('#option2').animate({

height: '365px', }, 500 );

});

});







any help is greatly apprecaited.


Comments

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?

Java Urban Myths

Along the line of C++ Urban Myths and Perl Myths : What are the Java Urban Myths? That is, the ideas and conceptions about Java that are common but have no actual roots in reality . As a Java programmer, what ideas held by your fellow Java programmers have you had to disprove so often that you've come to believe they all learned at the feet of the same drunk old story-teller? Ideally, you would express these myths in a single sentence, and include an explanation of why they are false.