northmeade Posted May 27, 2014 Share Posted May 27, 2014 Hi all, I did a site for a customer a couple of years ago and have been maintaining it since. He started clicking upgrade without any thought and made a propper mess. I thought the best course of action for me to repair it was to upgrade to 1.6. as it had gone completely blank on the front end. It is a flooring shop and I put a custom script on for working how many packs are needed. After upgrading, the script doesn't work and I can't for the life of me remember what I put or where I put it to make 'myform' work. Can anyone please help me? Here is the custom bit I put in the product description. and the site is wesellanyfloor.com It's a bit of a mess at the moment as I'm in the middle of sorting it out after my customer's hatchet job. Notice the number '2.38' is the number of square meters per pack, which my customer can alter according to each product My last 2 back ups are corrupt so I cant search for 'myform' and the previous one is from before I added the code Thanks very much, paul <p><strong>How Many Packs Will I Need?</strong></p> <script language="Javascript">// <![CDATA[ function Calc(myform){ var enternumber1 = document.myform.number1.value; var enternumber1 = parseFloat(enternumber1, 10); if (isNaN(enternumber1)|| (enternumber1 <0)){ alert (" Enter a valid number! "); document.myform.number1.value = ""; document.myform.number1.focus(); } else document.myform.number3.value= Math.ceil(enternumber1 / 2.38) ; } // ]]></script> <form name="myform"><br /> <strong>How Many Square Metres?</strong> <input maxlength="2147483647" name="number1" size="3" type="text" /> <br /> <br /><input name="button" type="button" value="Calculate" /> <br /><br /> <strong>You Will Need</strong> <input maxlength="2147483647" name="number3" size="3" type="text" value="" /> <strong>Boxes</strong></form> <p> </p> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now