Computers and Technology

CIS385 Final function openAccount() {
/*
- get the account and initial amount values
- check that all necessary information is provided
- call the setCookie function to create account
*/
}

function Deposit() {
/*
- get the account and amount values
- check that all necessary information is provided
- alter cookie with current amount of deposit
*/
}

function Withdraw() {
/*
- get the account and amount values
- check that all necessary information is provided
- alter cookie with current amount of withdraw
*/
}

function details() {
var cookievalue = "", str = document. cookie;
var total_bank = 0;
var prod_id = 1;
var cookie_array = str. split(";");
var x = " ";
x += " Bank Accounts ";
x += " " +
" Account " +
" Balance " +
" Actions ";
if (document. cookie. length !== 0) {
for (var i = 0; i < cookie_array. length; i++)
{
var B = cookie_array[i].split("=");
var Bname = B[0].toString();
x += " " + B[0] + " ";
x += " " + B[1] + " ";
x += " ";
x += " ";
total_bank += parseInt(B[1]);
}
}
x += " " + total_bank + " ";
x += " ";
document. getElementById("accounts").innerHTM L = x;
}

function eraseCookie(name) {
alert("Deleting Account: " + name);
setCookie(name, "", -1)
details();
}

function setCookie(cname, cvalue, exdays) {
var d = new Date();
d. setTime(d. getTime() + (exdays * 24 * 60 * 60 * 1000));
var expires = "expires=" + d. toUTCString();
document. cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}

function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document. cookie);
var ca = decodedCookie. split(';');
for (var i = 0; i < ca. length; i++) {
var c = ca[i];
while (c. charAt(0) == ' ') {
c = c. substring(1);
}
if (c. indexOf(name) == 0) {
return c. substring(name. length, c. length);
}
}
return "";
}

BMCC E-BANK

Account:

Balance:

Account:

Amount:

Account
Transaction
Previous Balance
Amount
New Balance

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:00, shayyy49
How can a broadcast station be received through cable and satellite systems?
Answers: 1
image
Computers and Technology, 22.06.2019 14:00, GGerardi7552
What are procedures that keep a data base current
Answers: 1
image
Computers and Technology, 23.06.2019 02:00, kayladgranger
Which demographic challenge is europe currently experiencing? a. an aging and decreasing population b. a baby boomc. an unequal distribution between males and females d. a large group of teenagers moving through the school system(i chose a but i'm unsure)
Answers: 1
image
Computers and Technology, 23.06.2019 11:00, jolleyrancher78
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
Do you know the correct answer?
CIS385 Final function openAccount() {
/*
- get the account and initial amount values

Questions in other subjects:

Konu
Geography, 19.05.2020 20:05
Konu
Computers and Technology, 19.05.2020 20:05