Hi All Can any website guru`s help me ....Java Script related

Hi

Does anyone how I can get a free java script for a website ...it`s similar to this

http://www.i-resign.com/uk/resignationkit/commissioncalc2.asp?t=s

Not being a techie hoping someone can help
“When the debate is lost, slander becomes the tool of the loser.” Socrates

Haters gonna hate

Comments

  • wolfman
    wolfman Posts: 3,225 Forumite
    I'm not the best when it comes to JavaScript so can't really help there, but I don't think they're using any on that site. Seems to be done via ASP (I've got JavaScript disabled).

    If you do it in .Net or Java I can! PHP or JavaScript is probably your best bet.
    "Boonowa tweepi, ha, ha."
  • crompton
    crompton Posts: 463 Forumite
    Part of the Furniture 100 Posts Combo Breaker
    yeah this is .asp (active server page)
    Like what I said? click thanks!:rotfl: :rotfl:

    100th Post : 31st July 2006
    200th Post : 10th September 2006
    300th Post : 6th January 2007
    300th Post : 12th April 2007
  • wonka
    wonka Posts: 484 Forumite
    Part of the Furniture 100 Posts Combo Breaker
    Although that page is in .ASP, what you want to do can easily be done in Javascript.

    This is very similar:
    http://www.steinermarketing.com/calc_sales_commission.htm

    What's more, click on "View Source", and all the javascript is exposed there, so you can re-use it, and maybe tailor it.
    Of course, I may just be talking b****cks!
  • i dunno what you coding skills are like but if you have any it should be easy enough to maniplate how you want it

    heres a simple percent caluclator and source code shows it javascript tp be quite simple

    http://www.onlineconversion.com/percentcalc.htm

    EDIT: OK Just wrote a quick very simple code that does the same thing. I edited an old javascript thing i had so code is a little crude. Anyway
    <html>
    <body>
    
    <script>
    
    function cal()
    
    !!
    document.form.answer.value=
    (((document.form.commision.value)/100) *(document.form.sales.value))
    }
    </script>
    
    
    <form name="form">
    Enter the values below to work out your commision. <br><br>
    Commision Percentage: <br> <Input type="text" size="20" font="arial" name="commision"><br>
    Total Sales: <br> <Input type="text" size="20" font="arial" name="sales">  <Input type="button" value="Calculate" name ="calculate" onClick="cal()">
    <br>
    Commision Due: <br> <Input type="text" size="20" font="arial" name ="answer"
    </form>
    <br><br><hr><br><br>
    
    
    </body>
    </html>
    

    on line 8 the !! should be a shift+[ it appears on this forum as !! for some reason
  • shinkyshonky
    shinkyshonky Posts: 2,782 Forumite
    Hi guys thank you all
    “When the debate is lost, slander becomes the tool of the loser.” Socrates

    Haters gonna hate
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 349.8K Banking & Borrowing
  • 252.6K Reduce Debt & Boost Income
  • 453K Spending & Discounts
  • 242.8K Work, Benefits & Business
  • 619.6K Mortgages, Homes & Bills
  • 176.4K Life & Family
  • 255.7K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 15.1K Coronavirus Support Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.