mirror of
https://github.com/OpenBankProject/API-Explorer.git
synced 2026-02-06 10:47:23 +00:00
So can call the url in input field
This commit is contained in:
parent
158c7e6a9d
commit
355f7d36ae
@ -81,15 +81,7 @@ object ApiCallForm extends Loggable {
|
||||
|
||||
def render = {
|
||||
|
||||
//for {
|
||||
|
||||
// S.param("url_to_call").get
|
||||
|
||||
val urlToCall = "/v1.4.0/banks" //
|
||||
//} {
|
||||
|
||||
|
||||
var name = ""
|
||||
var urlToCall = ""
|
||||
|
||||
// /v1.4.0/banks
|
||||
|
||||
@ -97,12 +89,11 @@ object ApiCallForm extends Loggable {
|
||||
SetHtml("result", Text(getResponse(urlToCall)))
|
||||
}
|
||||
|
||||
// So message in field disappears when we type in it?
|
||||
"@name" #> text(name, s => name = s) &
|
||||
// form field (on the left) is bound to the variable (urlToCall)
|
||||
// (However, updating the var here does not seeem to update the form field value)
|
||||
"@url_to_call" #> text(urlToCall, s => urlToCall = s) &
|
||||
// Replace the type=submit with Javascript that makes the ajax call.
|
||||
"type=submit" #> ajaxSubmit("Call OBP API", process)
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user