Can anyone please tell me why suddenly nothing is calculating when it was working fine just now? I moved a few things around but cant see why it wont calculate at all.
That's where the code on the page is telling the browser to look for the file - you could also change the code to properly specify the js file in the location where you are uploading it. Where is it within your local site?
Also, the browser is not finding this file either -
http://www.milesmemorials.com/Sites/Miles%20and%20Daughters%20/images/ button2.jpg
The case is wrong and you have a typo in your file name. This is the actual file on your server: validationfucntions.js
Browse to this location:
http://www.milesmemorials.com/CatalystScripts/ValidationFunctions.js
You get a file not found?
That's where this line of your code expects to find that script -
<script type="text/javascript" src="/CatalystScripts/ValidationFunctions.js"></script>
When you look at the Remote site in DW, where do you see that file? Can you give us a screen shot of the Files panel?
Yes that is what i done.
I changed this on the page
<script type="text/javascript" src="/CatalystScripts/ValidationFunctions.js"></script>
to
<script type="text/javascript" src="/CatalystScripts/validationfunctions.js"></script>
then i uploaded it. That is how i corrected typo but hasn't made any difference
You still have a typo. Your code is: /CatalystScripts/'validationfucntions.js
Notice the extra single quote.
You might want to take a look at this thread, link below. Kenneth came up with some rather simple jQuery (see below) that adds/subtracts and gives a final total, rather than a whole bunch of rather convoluted getBy elements: It may be applicable for your usage, I don't know.
http://forums.adobe.com/thread/1168391?tstart=120
Example as provided by Kenneth:
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script>
var BASE_PRICE = 625;
var total;
function doTotal() {
total = BASE_PRICE;
$("input[type='checkbox']").each(function(index, element) {
if(element.checked) total += +element.value;
});
$("#total")[0].value = "$" + total;
}
</script>
</head>
<body>
<form>
<input name="double-pedestal-legs" type="checkbox" id="double-pedestal-legs" value="550" onclick="doTotal()"/>
<label for="double-pedestal-legs">Double Pedestal Legs</label>
<p>+$550</p>
<input name="full-base-sheet" type="checkbox" id="full-base-sheet" value="75" onclick="doTotal()"/>
<label for="full base sheet">Full Base Sheet</label>
<p>+$75</p>
<input name="raised-rail" type="checkbox" id="raised-rail" value="125" onclick="doTotal()"/>
<label for="raised-rail">3/4" Raised Rail</label>
<p>+$125</p>
<label for="total">YOUR DREAM TABLE IS ONLY:</label>
<input name="total" type="text" id="total" readonly value="$625" />
</form>
</body>
</html>
Try this. Move it to this location so that this script src will find it -
<script src="/BcJsLang/ValidationFunctions.aspx?lang=EN" charset="utf-8" type="text/javascript"></script>
In other words, create that BcJsLang folder on your local site, copy the ValidationFunctions.aspx file into the folder, and then upload it from that folder to the server. Let's see what happens then.
North America
Europe, Middle East and Africa
Asia Pacific