Skip navigation
Currently Being Moderated

Why is my form not calculating?

Mar 15, 2013 10:04 AM

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.

 

http://www.milesmemorials.com/estimator.html

 
Replies 1 2 Previous Next
  • Currently Being Moderated
    Mar 15, 2013 10:21 AM   in reply to Ness_quick
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 10:58 AM   in reply to Ness_quick

    Perhaps, but you are not uploading it to where the page is looking for it. In the DW Files panel after connecting with the remote site, do you see that file in the "CatalystScripts" folder?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 11:09 AM   in reply to Ness_quick

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 11:26 AM   in reply to Ness_quick

    Once you placed the file into the new folder did you then UPLOAD IT?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 11:30 AM   in reply to Ness_quick

    The case is wrong and you have a typo in your file name. This is the actual file on your server: validationfucntions.js

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 11:32 AM   in reply to bregent

    I would also suggest getting rid of the scrolling div to improve usability. In order to complete the form the user needs to manipulate two scrollbars which is bad from a UI perspective.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 11:34 AM   in reply to Ness_quick

    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?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 11:45 AM   in reply to Ness_quick

    You have NOT fixed the typo. The filename still does not match what is in your code. Fix the typo, and then go into your browser source code and click on that js link and make sure you do not get a file not found error.

     

    http://www.milesmemorials.com/CatalystScripts/

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 11:48 AM   in reply to Ness_quick

    Please read my last post and answer that question at the bottom. A screen shot would help alot....

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 11:55 AM   in reply to Ness_quick

    Notice that the file's name is spelled in Klingon -

     

    validationfucntions.js

     

    You can either change the name of the file to something more acceptible -

     

    validationfunctions.js

     

    or change the code on the page to point to the actual file.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 12:02 PM   in reply to Ness_quick

    Nope - you didn't read my last post well. The filename is 'validationfucntions.js', not 'validationfunctions.js'. Fix that.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 12:11 PM   in reply to MurraySummers

    Now upload the renamed file and you should be golden.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 1:06 PM   in reply to Ness_quick

    You still have a typo. Your code is: /CatalystScripts/'validationfucntions.js

    Notice the extra single quote.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 1:39 PM   in reply to bregent

    Good grief.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 16, 2013 3:37 AM   in reply to Ness_quick

    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>

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 16, 2013 4:41 AM   in reply to Ness_quick

    But you have renamed the js file, right?  The link in the code and the filename HAVE to be consistent.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 16, 2013 10:16 AM   in reply to Ness_quick

    Goodness - you can't win for losing! Now you are missing another file - see snap below (in the left panel - ValidationFunctions.aspx)....

     

    SafariScreenSnapz101.jpg

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 17, 2013 5:58 AM   in reply to Ness_quick

    Do you see this file - ValidationFunctions.aspx - anywhere in your local site? If so, what is the path to it?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 17, 2013 7:42 AM   in reply to Ness_quick

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 17, 2013 8:42 AM   in reply to Ness_quick

    That's a relief.

     

    Are you happy with the layout and the way the page behaves in browsers?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 17, 2013 9:00 AM   in reply to Ness_quick

    Yes, I'm seeing some problems associated with that layout approach on your pages. We can tackle this conversion when you have recovered from this experience.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 17, 2013 9:16 AM   in reply to Ness_quick
    You might want to invetsigate the below input field the total goes all t*ts up when that is selected.

     

     
    |
    Mark as:
1 2 Previous Next

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points