Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: Help!!! ASAP

  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help!!! ASAP

    <HTML>
    <HEAD>
    <TITLE></TITLE>
    <SCRIPT LANGUAGE="JAVASCRIPT"><!--Hide from old browsers

    var msgSpace = "--- ---"
    var beginPos = 0


    function doMort() {
    document.MortCalc.Price.value=" "
    document.MortCalc.Shares.value=" "
    document.MortCalc.Dividend.value=" "
    document.MortCalc.Time.value=" "
    document.MortCalc.Price.focus()


    }

    function Calc(myform) {
    var mortAmount=document.MortCalc.Price.value
    var mortAmount=parseInt(mortAmount,10)
    if (isNaN(mortAmount)) {
    alert()
    document.MortCalc.Price.value=" "
    document.MortCalc.Price.focus()
    }
    else {
    var mortShares=document.MortCalc.Shares.value
    var mortShares=parseFloat(mortShares)
    if (isNaN(mortShares)) {
    alert()
    document.MortCalc.Shares.value=" "
    document.MortCalc.Shares.focus()
    }
    else {
    var mortDividend=document.MortCalc.Dividend.value
    var mortDividend=parseInt(mortDividend,10)
    if (isNaN(mortDividend)) {
    alert(")
    document.MortCalc.Dividend.value=" "
    document.MortCalc.Dividend.focus()
    }
    }
    }
    document.MortCalc.Time.value=monthly(mortPrice,mortShares,mortDividend)
    document.MortCalc.Time.value=dollarFormat(document.MortCalc.Time.value)

    }

    function Price(mortPrice,mortShares) {

    var Price * Shares

    }

    function dollarFormat(valuein) {
    var formatStr=""
    var Outdollars=""
    var decipos=valuein.indexOf(".")
    if (decipos==-1)
    decipos=valuein.length
    var dollars=valuein.substring(0,decipos)
    var dollen=dollars.length
    if (dollen>3) {
    while (dollen>0) {
    tDollars=dollars.substring(dollen-3,dollen)
    if (tDollars.length==3) {
    Outdollars=","+tDollars+Outdollars
    dollen=dollen-3
    } else {
    Outdollars=tDollars+Outdollars
    dollen=0
    }
    }
    if (Outdollars.substring(0,1)==",")
    dollars=Outdollars.substring(1,Outdollars.length)
    else
    dollars=Outdollars
    }
    var cents=valuein.substring(decipos+1,decipos+3)
    if (cents=="")
    cents="00"
    var formatStr="$"+dollars+"."+cents
    return formatStr

    }
    open("Notice.htm","noticeWin","WIDTH=400,HEIGHT=220")

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,928
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    Before you continue posting in this forum please read the forum rules and posting guidelines. Especially:-

    The posting guidelines regarding silly thread titles. The thread title is supposed to help people who have a similar problem in future. Yours is useless for this purpose. You can (and should) edit it to make it more meaningful. And ASAP is simply rude. People are not standing around here 24/7 just waiting to jump to it when you decide you want something.

    When posting here please follow the posting guidelines and wrap your code in CODE tags. This means use the octothorpe or # button on the toolbar. You can (and should) edit your previous post.

    <script language=javascript> is long deprecated and obsolete. Use <script type = "text/javascript"> instead. The <!-- and //--> comment (hiding) tags have not been necessary since IE3 (i.e. since September 1997). If you see these in some published script it is a warning that (as here) you are looking at ancient and perhaps unreliable code.

    Finally, have you tried using your error console? You cannot expect other people to find out the syntax errors in your code.

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,210
    Thanks
    75
    Thanked 4,343 Times in 4,309 Posts
    You missed one major thing, Philip:

    WHAT THE HECK IS THE PROBLEM????

    All he does is slap a bunch of code up there and expect the clairvoyants to know what he wants done with it.

    Maybe we should just format it for him and tell him it's now perfect???
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #4
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    What a bunch of assholes!!!

    What a bunch of assholes!!!

  • #5
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,210
    Thanks
    75
    Thanked 4,343 Times in 4,309 Posts
    Now *THAT* is the way to get help! LOL! Just as soon as hell freezes over.

    I will tell you that so little of that code makes sense that I really don't have any idea what it is supposed to do. But I suspect that's your problem, too.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #6
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,928
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    Quote Originally Posted by Old Pedant View Post
    Now *THAT* is the way to get help! LOL! Just as soon as hell freezes over.

    I will tell you that so little of that code makes sense that I really don't have any idea what it is supposed to do. But I suspect that's your problem, too.
    He is only an immature child. But it amazes me that even children are so dim-witted as to think they will gain anything by hurling abuse at people who they expect to help them. That certainly signals the end of this guy's career in this forum.

  • #7
    New Coder
    Join Date
    Mar 2010
    Location
    New Jersey USA
    Posts
    81
    Thanks
    13
    Thanked 4 Times in 4 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •