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

    • Modern Ops: Online Shooter FPS v9.53 +6 Cheats [ No Recoil + More ]
      Modded/Hacked App: Modern Ops: Online Shooter FPS By Edkon Games GmbH
      Bundle ID: com.edkongames.mobs
      App Store Link: https://apps.apple.com/us/app/modern-ops-online-shooter-fps/id1415791453?uo=4

       
       

      🤩 Hack Features

      - No Recoil
      - No Spread
      - No Flashbang Effect
      - No Smoke Effect
      - Red Crosshairs
      - Field of View Modifier
      • 0 replies
    • Hanuman & Fighters Versus Evil v1.1 [+3 Jailed Cheats]
      Modded/Hacked App: Hanuman & Fighters Versus Evil By VOJOY GAMES PRIVATE LIMITED
      Bundle ID: com.vojoygames.hanumangame.ios
      App Store Link: https://apps.apple.com/us/app/hanuman-fighters-versus-evil/id6737682082?uo=4

       

      🤩 Hack Features

      - Enemy Can't Attack
      - Unlimited Gold
      - Unlock All Levels
      • 1 reply
    • Hanuman & Fighters Versus Evil v1.1 [+3 Cheats]
      Modded/Hacked App: Hanuman & Fighters Versus Evil By VOJOY GAMES PRIVATE LIMITED
      Bundle ID: com.vojoygames.hanumangame.ios
      App Store Link: https://apps.apple.com/us/app/hanuman-fighters-versus-evil/id6737682082?uo=4



      🤩 Hack Features

      - Enemy Can't Attack
      - Unlimited Gold
      - Unlock All Levels
       
      • 1 reply
    • Idle Army: Trading Weapons v1.12.2 [+5 Jailed Cheats]
      Modded/Hacked App: Idle Army: Trading Weapons By UNIMOB VIET NAM COMPANY LIMITED
      Bundle ID: com.unimob.idle.army
      App Store Link: https://apps.apple.com/us/app/idle-army-trading-weapons/id6670773625?uo=4



      🤩 Hack Features

      - Always Enough Resources (Gem, Skip Ads etc.)
      - Max Gold (Enable inside game)
      - 2x Game Speed (Enable inside game)
      - Kill Monster (Enable inside game)
      - Add All Pet

      • 1 reply
    • Idle Army: Trading Weapons v1.12.2 [+5 Cheats]
      Modded/Hacked App: Idle Army: Trading Weapons By UNIMOB VIET NAM COMPANY LIMITED
      Bundle ID: com.unimob.idle.army
      App Store Link: https://apps.apple.com/us/app/idle-army-trading-weapons/id6670773625?uo=4

       

      🤩 Hack Features

      - Always Enough Resources (Gem, Skip Ads etc.)
      - Max Gold (Enable inside game)
      - 2x Game Speed (Enable inside game)
      - Kill Monster (Enable inside game)
      - Add All Pet

      • 1 reply
    • Margonem Adventures v1.16.2 [+3 Jailed Cheats]
      Modded/Hacked App: Margonem Adventures By GARMORY sp. z o.o. sp. k.
      Bundle ID: pl.Garmory.MargonemAdventures
      iTunes Store Link: https://apps.apple.com/us/app/margonem-adventures/id6444410609?uo=4

       

      🤩 Hack Features

      - Enemy Can't Move
      - Enemy Can't Attack
      - Unlimited Mana
      • 18 replies
    • Margonem Adventures v1.16.2 [+3 Cheats]
      Modded/Hacked App: Margonem Adventures By GARMORY sp. z o.o. sp. k.
      Bundle ID: pl.Garmory.MargonemAdventures
      iTunes Store Link: https://apps.apple.com/us/app/margonem-adventures/id6444410609?uo=4



      🤩 Hack Features

      - Enemy Can't Move
      - Enemy Can't Attack
      - Unlimited Mana
      • 11 replies
    • XP Hero v9.0.0 [+3 Cheats]
      Modded/Hacked App: XP Hero By Supercent Inc.
      Bundle ID: io.supercent.weaponrpg
      iTunes Store Link: https://apps.apple.com/us/app/xp-hero/id6740618570?uo=4



      🤩 Hack Features

      - Add Currency (Enable and You'll Recieve All Currency)
      - Add Xp
      - Enemy Can't Attack
       
      • 7 replies
    • XP Hero v9.0.0 [+3 Jailed Cheats]
      Modded/Hacked App: XP Hero By Supercent Inc.
      Bundle ID: io.supercent.weaponrpg
      iTunes Store Link: https://apps.apple.com/us/app/xp-hero/id6740618570?uo=4



      🤩 Hack Features

      - Add Currency (Enable and You'll Recieve All Currency)
      - Add Xp
      - Enemy Can't Attack
      • 6 replies
    • Townfall: Zombie Tower Defense v20.2.5 [+4 Cheats]
      Modded/Hacked App: Townfall: Zombie Tower Defense By Sugarscone
      Bundle ID: com.nmg.townfall.ios
      App Store Link: https://apps.apple.com/us/app/townfall-zombie-tower-defense/id6476259669?uo=4



      🤩 Hack Features

      - No Reload
      - Add Gold (Enable inside battle and finish stage)
      - Add Wood (Enable inside battle)
      - Skip Wave (Enable inside wave)
      • 11 replies
    • Townfall: Zombie Tower Defense v20.2.5 [+4 Jailed Cheats]
      Modded/Hacked App: Townfall: Zombie Tower Defense By Sugarscone
      Bundle ID: com.nmg.townfall.ios
      App Store Link: https://apps.apple.com/us/app/townfall-zombie-tower-defense/id6476259669?uo=4



      🤩 Hack Features

      - No Reload
      - Add Gold (Enable inside battle and finish stage)
      - Add Wood (Enable inside battle)
      - Skip Wave (Enable inside wave)
      • 16 replies
    • Endless Wander - Roguelike RPG v2.4.22 [+3 Jailed Cheats]
      Modded/Hacked App: Endless Wander - Roguelike RPG By First Pick Studios
      Bundle ID: com.FirstPickStudios.Endless-Wander
      App Store Link: https://apps.apple.com/us/app/endless-wander-roguelike-rpg/id6473157705?uo=4



      🤩 Hack Features

      - Never Die
      - Always Enough Currency
      - Unlimited Currency (Will Always Increase)
      • 11 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