Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irma_idin_webclient
Commits
51191224
Commit
51191224
authored
Mar 17, 2017
by
Fabian van den Broek
Browse files
bank select lijstje
parent
7a8fd9e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
iDIN.js
0 → 100644
View file @
51191224
$
(
function
()
{
var
server
=
"
http://localhost:8080/irma_idin_server/api/v1/idin
"
;
function
getBanks
(){
$
.
ajax
({
type
:
"
GET
"
,
contentType
:
"
application/json;charset=utf-8
"
,
url
:
server
+
"
/banks
"
,
success
:
populateBankSelect
,
error
:
error
,
});
}
function
populateBankSelect
(
data
)
{
$
.
each
(
data
,
function
(
countryName
,
issuers
)
{
var
optgroup
=
$
(
'
<optgroup>
'
).
attr
(
'
label
'
,
countryName
);
$
.
each
(
issuers
,
function
(
i
,
issuer
)
{
optgroup
.
append
(
$
(
'
<option>
'
).
text
(
issuer
[
"
issuerName
"
]).
attr
(
'
value
'
,
issuer
[
"
issuerID
"
]));
});
$
(
'
#bank-select
'
).
append
(
optgroup
);
});
}
function
error
(
jqXHR
,
status
,
error
)
{
console
.
log
(
jqXHR
,
status
,
error
);
}
getBanks
()
});
index.html
0 → 100644
View file @
51191224
<!DOCTYPE html>
<html
lang=
"nl"
>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"description"
content=
""
>
<meta
name=
"author"
content=
""
>
<link
rel=
"icon"
href=
"../../favicon.ico"
>
<title>
Basis attributen laden met iDIN
</title>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"iDIN.js"
></script>
</head>
<body>
<select
id=
"bank-select"
>
<option>
Choose a bank
</option>
</select>
</body>
</html>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment