Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 9th, 2012, 06:46 PM
Registered User
 
Join Date: Jun 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Javascript help with code

I need help with a code in javascript that looks if the person has a resale number and if they do if they a discount percentage for sales tax for how much they spend. I am wondering how you can do this in if else statements. If they do not have a resale number it automatically displays sales tax at 6%.
 
Old June 12th, 2012, 04:19 PM
Authorized User
 
Join Date: Jun 2012
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Yes, you can use an if statement. Your logic would be something like this:

If user has resale value
Give discount
Else
Tax is 6%

I hope this helps. If not, could you post your code so we can look at it and give you some pointers?





Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript code popuri_krishna Javascript How-To 0 May 23rd, 2007 11:58 PM
problems with JavaScript Code red_fiesta Javascript 5 March 6th, 2007 04:44 PM
javascript as well as codebehind code k.manisha .NET Framework 1.x 0 November 24th, 2006 04:23 AM
using javaScript in the code behind @shish ASP.NET 1.0 and 1.1 Basics 1 April 10th, 2006 03:19 PM
JavaScript Code problem Ben Horne Javascript 5 February 11th, 2006 02:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.