Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 23rd, 2005, 06:08 PM
bslintx's Avatar
bslintx bslintx is offline
Contributing User
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2004
Location: United States
Posts: 1,814 bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Weeks 3 Days 17 h 26 m 7 sec
Reputation Power: 7
Send a message via Yahoo to bslintx
Useful Functions/Scripts

Hey fellow contributors! well, i was thinking of perhaps starting a "Useful Functions/Scripts page" to eventually add to main asp forum. the idea is to provide OPEN SOURCE code that follows asp/html specs, etc. It would be awesome to have everyone's input on what would make the code better...vote on it...when we think it's completed have a moderator review and if deemed fit for posting then do so. i believe this will potentially bring in more newbies into the forum to help out. besides that i am way curious into how the basic code transforms over the interim into a true slick lil piece of code. i'd like to do ONE at a time of course and suggestions are welcome and vote on priority...ahem after my first entry of course. Remember....try npot to overlook anything ....for example...iin the piece am contributing has no comments as of now but will eventually...so if you build on mine like turning it into a more efficient function for example please include comments. Once completed and blessed by a moderator and g2g for posting then that entry gets 2 rep points when completed because of the idea and starting of the code....recoginition for others should be commented in open source code...if it's 100 it's 100....bottomline is..if we use a suggestion or code...your name is added to list. obviously we can't give out rep points out like candy so only the original poster gets the points...and perhaps will intrigue others to "show-off" their talents and submit soon afyerwards! (Hoping!!) anyways...first thing is first...iif you like this idea than let's vote on it..ahem...shadow? may need your help on this...if you can add a poll then please do...i have no freaking clue how..lol...otherwise we vost comments here...anyways here goes nothin.....

bslintx


any moderator voliunteers for this?
__________________
Please give respect to those that helped solve an issue by clicking on the icon

Last edited by bslintx : May 23rd, 2005 at 06:11 PM.

Reply With Quote
  #2  
Old May 23rd, 2005, 06:14 PM
bslintx's Avatar
bslintx bslintx is offline
Contributing User
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2004
Location: United States
Posts: 1,814 bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Weeks 3 Days 17 h 26 m 7 sec
Reputation Power: 7
Send a message via Yahoo to bslintx
First Submission...car loan calculator

http://k.domaindlx.com/bslintx/car_calc.asp
Code:
<html>
<head>
</head>
<body>
<h3>Car Loan Calculation Demo</h3>
<hr>
<%
 
retail_price = Request.Form("retail_price")
%>
<form action="car_calc.asp" method="post">
Retail Price: $ <input name="retail_price" size="9" maxlength="9"><br>
Down Payment: $ <input name="down_payment" size="9" maxlength="9"><br>
Sales Tax: <input name="sales_tax" size="4" maxlength="4"> %<br>
Annual Interest Rate: <input name="annual_interest_rate" size="4" maxlength="4"> %<br>
Term of Loan: <select name="term_months">
				 <option value="">-------Select-------</option>
				 <option value="12">12 months</option>
				 <option value="24">24 months</option>
				 <option value="36">36 months</option>
				 <option value="48">48 months</option>
				 <option value="60">60 months</option>
				 <option value="72">72 months</option>
				 <option value="84">84 months</option>
				</select><br>
<input type="submit" name="submit" value="Calculate">
<input type="reset" name="reset" value="Reset">
</form>
<hr>
<%
 
If Request.Form("submit") <> "" _
AND Trim(Request.Form("retail_price")) <> "" AND isNumeric(Trim(Request.Form("retail_price"))) _
AND Trim(Request.Form("down_payment")) <> "" AND isNumeric(Trim(Request.Form("down_payment"))) _
AND Trim(Request.Form("sales_tax")) <> "" AND isNumeric(Trim(Request.Form("sales_tax"))) _
AND Trim(Request.Form("annual_interest_rate")) <> "" AND isNumeric(Trim(Request.Form("annual_interest_rate"))) _
AND Trim(Request.Form("term_months")) <> "" AND isNumeric(Trim(Request.Form("term_months"))) Then
%>
 
<h3>Results: </h3>
<%
retail_price = FormatCurrency(Request.Form("retail_price"),2)
down_payment = FormatCurrency(Request.Form("down_payment"),2)
sales_tax = Request.Form("sales_tax") 
	If sales_tax > 0 Then
	 sales_tax = sales_tax/100
	ElseIf sales_tax < 0 Then
	 sales_tax = sales_tax
	End If
annual_interest_rate = Request.Form("annual_interest_rate")
	 If annual_interest_rate > 0 Then
	 annual_interest_rate = annual_interest_rate/100
	ElseIf annual_interest_rate < 0 Then
	 annual_interest_rate = annual_interest_rate
	End If
term_months = Request.Form("term_months") 
Const annual = 12 
 
response.Write "Retail Price: " & retail_price & "<br>"
response.write "Sales Tax Amount: " & formatCurrency(retail_price * sales_tax,2) & " (" & sales_tax & "%)<br>"
total_retail_price = formatCurrency((retail_price * sales_tax + retail_price),2)
response.write "Total Retail Price: " & total_retail_price & "<br>" 
response.write "Down Payment: " & (down_payment) & "<br>"
ammount_financed = formatCurrency(total_retail_price - down_payment,2)
response.write "Amount Financed: " & ammount_financed & "<br>" 
monthly_payment = (ammount_financed * annual_interest_rate/annual) / (1 - (1 + annual_interest_rate/annual)^-term_months)
response.write "Monthly Payment: " & formatCurrency(monthly_payment,2) & "<br>"
total_amount_owed = "Total Amount Owed: " & formatCurrency(monthly_payment * term_months,2)
response.write total_amount_owed
 
 
Else
End If
%>
Comments on this post
crazyace agrees: Thanks FOR ALL us newbies this is a great way to learn the true power-- hope the post pickup

Reply With Quote
  #3  
Old May 24th, 2005, 10:39 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,737 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 5 h 41 m 46 sec
Reputation Power: 1914
nice thread, I'll add some nice gadgets I have soon.
as for poll, no need - comments and replies would be good enough...

Reply With Quote
  #4  
Old May 24th, 2005, 08:49 PM
bslintx's Avatar
bslintx bslintx is offline
Contributing User
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2004
Location: United States
Posts: 1,814 bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Weeks 3 Days 17 h 26 m 7 sec
Reputation Power: 7
Send a message via Yahoo to bslintx
Quote:
Originally Posted by Shadow Wizard
nice thread, I'll add some nice gadgets I have soon.
as for poll, no need - comments and replies would be good enough...



thanks for moving shadow...appreciated!....4got about the code help

Reply With Quote
  #5  
Old May 25th, 2005, 06:43 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,737 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 5 h 41 m 46 sec
Reputation Power: 1914
sure, no problem... so what do you prefer? pythagorean triples, converting to hex or draw board? actually, I've already posted the draw board:
http://forums.aspfree.com/t61326/s.html

Reply With Quote
  #6  
Old May 26th, 2005, 03:34 PM
bslintx's Avatar
bslintx bslintx is offline
Contributing User
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2004
Location: United States
Posts: 1,814 bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Weeks 3 Days 17 h 26 m 7 sec
Reputation Power: 7
Send a message via Yahoo to bslintx
Quote:
Originally Posted by Shadow Wizard
sure, no problem... so what do you prefer? pythagorean triples, converting to hex or draw board? actually, I've already posted the draw board:
http://forums.aspfree.com/t61326/s.html



in your opinon....not getting much of a response here...thought for sure would...it involves anyone and many can learn through others talents from the original code to final stage.....any suggestions to bring 'em in?...thanks

Reply With Quote
  #7  
Old May 26th, 2005, 05:46 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,737 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 5 h 41 m 46 sec
Reputation Power: 1914
I'll think of something... but we can't promise reputation points for each code posted, it would make the whole thing look too... artificial. people should share their code willingly out of desire to help, not get points.

Reply With Quote
  #8  
Old May 26th, 2005, 11:20 PM
bslintx's Avatar
bslintx bslintx is offline
Contributing User
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2004
Location: United States
Posts: 1,814 bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level)bslintx User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Weeks 3 Days 17 h 26 m 7 sec
Reputation Power: 7
Send a message via Yahoo to bslintx
Quote:
Originally Posted by Shadow Wizard
I'll think of something... but we can't promise reputation points for each code posted, it would make the whole thing look too... artificial. people should share their code willingly out of desire to help, not get points.



fair enough...thought of an incentive...but i guess it comes down to the true reward is working w/ ea other and comng up w/ nice scripts; therefore, no worries on rep points....thanks for looking into it

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Useful Functions/Scripts


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT