AllExperts > Experts 
Search      

Javascript

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More Javascript Answers
Question Library

Ask a question about Javascript
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Anthony Levensalor
Experience
I have been programming in Java and Javascript since 1998. I run a web development company that specializes in Ajax front ends with PHP/MySQL back ends. I am a Sun Certified Java 2 Developer, and have done nothing but web applications for the last two years in my business

Past/Present clients
Monster.com, Compuware Corporation, Flextronics International, Pragmatech Software, Open Travel Software, The Loss Mitigation Institute, Raw Story Media, Page One News Media.

 
   

You are here:  Experts > Computing/Technology > Focus on JavaScript > Javascript > regarding price cal script for photo frame

Topic: Javascript



Expert: Anthony Levensalor
Date: 1/18/2008
Subject: regarding price cal script for photo frame

Question
sir,
i like ur script, which calculates price of given picture frames., but sir i need simple script thal can calculate as follow:

{2 X(length + width)} X [rate or price per inch]= total

Sir Can you Help me.....plzz...

My mail ID is > rasalsunil@gmail.com

Answer
I would be glad to help, sure.

Your javascript function would look like this:

function calcTotal(len, wid, r) {
 return ( 2 * ( len + wid ) ) * r
}

And then you could call it from any button like so:
<button onclick="calcTotal(1,1,5); return false;">Calculate</button>

Hope this helps,
~A!

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.