Jump to content

Who can fix my code?


Go to solution Solved by arthurdapaz,

8 posts in this topic

Recommended Posts

Posted

I have a html project right now,but I massed my codes.
Please help!
Here's my html.
It's about bank systems.
I used JavaScript to build my stuff.




<!doctype html>

<html>

<head>

<title>oh</title>



<h2>Bank Machine</h2>

<img src="https://www.riobk.com/ContentImageHandler.ashx?ImageId=76121"alt="Welcome to our bank">







</head>



<body>

<script>



//variable

var accountname = 5;

var accountpass = 6;

var count =3;







//array







var matrix = [

["Mr", "John", "Smith", 46, 10000, "smith_j", "welcome"],

["Ms", "N", "Painchaud", 21, 60000, "MsP", "hurtyou"],

["Mrs", "Julie", "Donner", 45, 500, "dontlknow", 1234],

["Mrs", "T", "Wit", 34, 350, "twit", "nuunuu"]



]



while (count >= 0){

//entering user name and password



var username = prompt("Give me a username, welcome");

var password = prompt("type your password, please! you only have three chances!!!!!!!!!!!!!!");







function login()

{

for (var row = 0; row < matrix.length;row++)

{





if ((username == matrix[row][5]) && (password == matrix[row][6]))

{



alert("Welcome! " + matrix[0][5] + ".");

}





}





alert("incorrect!");

count--;

}

}



//swithch



function disaster()

{

do{

var disaster = prompt("Do you want to check your withdrawal (1)? deposit (2) or balance (3)");



switch(disaster)

{

case"1":

withdrawal();

again=2;

break;

case"2":

deposit();

again=2;

break;

case"3":

balance();

again=2;

break;

default: var again=1;

}



}



}



while(again=1)





//withdrawal



function withdrawal(){



var money = prompt("How much?");



money = parseInt(money)



if (matrix[accountname][accountpass]-money<0)



{

alert("You don't have enough funds!")



}

var w = prompt("try again? yes or no?");

if (w == "yes")

{



withdrawal();





}



else

{

matrix[accountname][accountpass]=money;

alert("Your new balance is "+matrix[accountname][accountpass]);



}







}







function deposit()

{

var amount = prompt("How much?");

benefit = parseInt(benefit)

//do{

//var benefit = prompt("What account do you want to deposit it in saving or chequing?");



}

}







function antransaction()

{

uantransction = prompt("Do you want another transaction?");

return uantransction;

}









function balance()

{

do {

alert("Your current balance is $" + balance + ".");

}while (antransaction())

}











function nontransaction()

{

var printout = prompt("Do you want a printout of your transaction?")

if (printout == "yes")

{

alert("Thank you!!")



}

else

{

document.write("Your balance is $" + hahabalance + ".")

}

}





















</script>

</body>

</html>

 

 

Posted

I don't have a computer with me now

And this project is due today.

I runned it on my computer, without problems. There is no coding errors, but functions aren't called.

 

What's your goal with this code?

Posted (edited)

I runned it on my computer, without problems. There is no coding errors, but functions aren't called.What's your goal with this code?

 

Can you try my code after you called it?

My goal is to run the code with some pop ups.

Updated by QQRK
Posted

Can you try my code after you called it?

My goal is to run the code with some pop ups.

you didn't call any function anywhere... where do you want to call a popup? at page load? or when the user clicks something?

Posted

Now your code is working. But you have to fix the logic. check your code here.I also revamped it a bit, to make it look better. :)Also here is the complete .html file, if you prefer it.

 

 

Thank you!

Did you test the function?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • Piggy Land 3D v1.2.2 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Piggy Land 3D By PIXON PTE. LTD.
      Bundle ID: farm.piggy.animal.jam.away
      App Store Link: https://apps.apple.com/us/app/piggy-land-3d/id6762121301?uo=4

      🤩 Hack Features

      - Auto ADS No
      - Unlimited Coin
      - Unlimited Booster
      - Custom Level
        • Like
      • 0 replies
    • Piggy Land 3D v1.2.2 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Piggy Land 3D By PIXON PTE. LTD.
      Bundle ID: farm.piggy.animal.jam.away
      App Store Link: https://apps.apple.com/us/app/piggy-land-3d/id6762121301?uo=4

      🤩 Hack Features

      - Auto ADS No
      - Unlimited Coin
      - Unlimited Booster
      - Custom Level
      • 0 replies
    • Dwarfs Diggers: Idle Master v0.7.4 [ +4 Jailed ] Currency Freeze
      Modded/Hacked App: Dwarfs Diggers: Idle Master By BLACK BOX DIGITAL LLP
      Bundle ID: com.bbdigital.idle.dwarfs.master
      App Store Link: https://apps.apple.com/us/app/dwarfs-diggers-idle-master/id6769121279?uo=4

      🤩 Hack Features

      - Currency Freeze
      - Resources Freeze
      - Energy Freeze
      - Troop Drop Unlimited
        • Like
      • 1 reply
    • Dwarfs Diggers: Idle Master v0.7.4 [ +4 Cheats ] Currency Freeze
      Modded/Hacked App: Dwarfs Diggers: Idle Master By BLACK BOX DIGITAL LLP
      Bundle ID: com.bbdigital.idle.dwarfs.master
      App Store Link: https://apps.apple.com/us/app/dwarfs-diggers-idle-master/id6769121279?uo=4

      🤩 Hack Features

      - Currency Freeze
      - Resources Freeze
      - Energy Freeze
      - Troop Drop Unlimited
        • Like
      • 0 replies
    • Metal Slug Rush v1.0.0 [ +9 APK MOD ] Currency Max
      Mod APK Game Name: Metal Slug Rush
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.ringgames.msm

      🤩 Hack Features

      - Unlimited Gold
      - Unlimited Gems
      - Unlimited Energy
      - Unlimited Silver keys
      - Unlimited Golden Keys
      - Unlimited Special Keys
      - Unlimited Blueprint
      - Unlimited Token
      - Unlimited Ticket +3
        • Agree
        • Like
      • 1 reply
    • Metal Slug Rush v1.0.0 [ +9 Cheats ] Currency Max
      Modded/Hacked App: Metal Slug Rush By REVIVECONTENTS CO.,LTD.
      Bundle ID: com.ringgames.msm
      App Store Link: https://apps.apple.com/us/app/metal-slug-rush/id6775727338?uo=4

      🤩 Hack Features

      - Unlimited Gold
      - Unlimited Gems
      - Unlimited Energy
      - Unlimited Silver keys
      - Unlimited Golden Keys
      - Unlimited Special Keys
      - Unlimited Blueprint
      - Unlimited Token
      - Unlimited Ticket +3
        • Thanks
        • Like
      • 3 replies
    • Metal Slug Rush v1.0.0 [ +9 jailed ] Currency Max
      Modded/Hacked App: Metal Slug Rush By REVIVECONTENTS CO.,LTD.
      Bundle ID: com.ringgames.msm
      App Store Link: https://apps.apple.com/us/app/metal-slug-rush/id6775727338?uo=4

      🤩 Hack Features

      - Unlimited Gold
      - Unlimited Gems
      - Unlimited Energy
      - Unlimited Silver keys
      - Unlimited Golden Keys
      - Unlimited Special Keys
      - Unlimited Blueprint
      - Unlimited Token
      - Unlimited Ticket +3
        • Agree
        • Like
      • 3 replies
    • Pixel Mage: Idle RPG +10 Mods [ Unlimited Currencies ]
      Mod APK Game Name: Pixel Mage: Idle RPG By StreetComplete
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.streetcomplete.pixelmagician

       

      🤩 Hack Features

      - Damage Multiplier
      - Attack/Move Speed Multiplier
      - Freeze Gold
      - Unlimited Gold -> Will increase instead of decrease.
      - Freeze Blue Diamonds
      - Unlimited Blue Diamonds -> Will increase instead of decrease.
      - Freeze Red Diamonds
      - Unlimited Red Diamonds -> Will increase instead of decrease.
      - Freeze Purple Diamonds
      - Unlimited Purple Diamonds -> Will increase instead of decrease.
        • Thanks
        • Like
      • 0 replies
    • Pixel Mage: Idle RPG +10 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Pixel Mage: Idle RPG By YONGJIN JO
      Bundle ID: com.streetcomplete.pixelmagician
      App Store Link: https://apps.apple.com/us/app/pixel-mage-idle-rpg/id6741889270?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Attack/Move Speed Multiplier
      - Freeze Gold
      - Unlimited Gold -> Will increase instead of decrease.
      - Freeze Blue Diamonds
      - Unlimited Blue Diamonds -> Will increase instead of decrease.
      - Freeze Red Diamonds
      - Unlimited Red Diamonds -> Will increase instead of decrease.
      - Freeze Purple Diamonds
      - Unlimited Purple Diamonds -> Will increase instead of decrease.
        • Agree
        • Winner
        • Like
      • 10 replies
    • Toy Brawlers: Arena Fight +3 Mods [ Damage & Defence ]
      Mod APK Game Name: Toy Brawlers: Arena Fight By Studıo Gamebıt Yazılım Ve Teknoloji Ltd. Şti.
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.studiogamebit.toybrawlers

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
        • Winner
      • 0 replies
    • Bullet Boy v41 [ +1 Cheats ] Gems Max
      Modded/Hacked App: Bullet Boy By Outbox SRL
      Bundle ID: com.pomelogames.BulletBoy
      App Store Link: https://apps.apple.com/us/app/bullet-boy/id899606169?uo=4

      🤩 Hack Features

      - Gems Max
        • Like
      • 0 replies
    • Bullet Boy v41 [ +1 Jailed ] Gems Max
      Modded/Hacked App: Bullet Boy By Outbox SRL
      Bundle ID: com.pomelogames.BulletBoy
      App Store Link: https://apps.apple.com/us/app/bullet-boy/id899606169?uo=4

      🤩 Hack Features

      - Gems Max
        • Like
      • 5 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines