Javascript help - quotation form

  • kitcorsa
  • Graduate
  • Graduate
  • kitcorsa
  • Posts: 132

Post 3+ Months Ago

refering to my post i creted regarding a quotion form i have created programming-forum/wordpress-javascript-php-mail-form-help-needed-t108414.html

I am stuck. Im not very good in Javascript and im stuck as far as i have got in the above post.

What im looking to do is create a quotation form that allows a customer to get a quote for flooring (not actually flooring but same principle) depending on the square meterage of the room / rooms they want doing.

So far if you see the above post i have the form created and the customer can click an add room button and enter the dimensions of the room and get a price ofr the room, then add another room and so on and get a total price.

What i would like to do is add a second price if possible where the first say 100sqm are one price ever square meter after is a different price.

Can anyone help please.

http://jsfiddle.net/aAfQp/ here is a start
  • ScottG
  • Proficient
  • Proficient
  • ScottG
  • Posts: 477

Post 3+ Months Ago

Ok well to keep this simple your talking in meters and the code is in feet so I'm going to go with the sq ft the code should work the same for meters if you stat that it is in meters and not feet.

This is based on the room and not the total
http://jsfiddle.net/yGvGH/
  • kitcorsa
  • Graduate
  • Graduate
  • kitcorsa
  • Posts: 132

Post 3+ Months Ago

thats great, yeah the thought was originally designed to be square feet but then we changed to metres but i enver updated the fiddle as the it just a name change on the final design.

that code is cool and works well, how ever what I'm trying to figure out is chare on rate upto 100 then another over ie a room with 50metrs then a 25m room then a 30 metre room at a price of 1 per share m upto 100 the 0.50 everything over would mean total price of 102.50

otherwise a 101 room would cost less than a 100 room, if you know what i mean
  • kitcorsa
  • Graduate
  • Graduate
  • kitcorsa
  • Posts: 132

Post 3+ Months Ago

ie using your fiddle if you put in a room of 1 x 101 you will see, as the estimate still shows the price 1 but description shows the other price
  • kitcorsa
  • Graduate
  • Graduate
  • kitcorsa
  • Posts: 132

Post 3+ Months Ago

http://jsfiddle.net/aAfQp/12/

think i figured it out
  • kitcorsa
  • Graduate
  • Graduate
  • kitcorsa
  • Posts: 132

Post 3+ Months Ago

found error were if the total come to a desimol between 100 and 101 metres it fails,

here is the fix
http://jsfiddle.net/aAfQp/13/

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 73 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.