CAN I OPEN A BROWSER WINDOW IN A NINOX FORM?
I think I know the answer to this (=no) but just curious. It would mean I can make bio details on another database visible inside a record without having to transfer content.
10 replies
-
@David. You are correct.. You cannot open a browser window in a Ninox form. You can..
1. Provide a URL link field.
2. Use an http("GET", "http://blahblah.com/page.html") and put in an rich text field..
3. Some other way that I have not thought of..
That said.. if you want to "make bio details on another database visible .... " and you are the owner of that other database, you could put a REST/API on top of that other database and use Ninox HTTP REST calls to pull the information in..
-
Yes, thanks for that.
The controller of the other database is a security fiend who would, unfortunately, see Ninox as the doorway for all kinds of external threats! But it's probably worth a try.
Your option 2 would mean placing a line of NN script actually in the RTF?
-
Option 2 is HIGHLY dependent on what the HTML currently is. Here is a snippet that you can put in a formula .. Of course.. you could parse the response html yourself .. and pull just what you want.. but that sounds like a lot of work..
let t := this;
let URL := "https://tools.ietf.org/html/rfc7231";
let c := "http(method, url, header, body)";
let rt := html("");
let response := http("GET", URL);
if response.error then
rt := html("<h1>Error</h1><p>" + text(response.error) + "</p>");
alert(text(response.error))
else
rt := html(response.result)
end;
rt -
Well that's an interesting idea but it seems to just throw up an error for any web address I put into it. I think I may be chasing a unicorn here. Using option 1 will do for now! Thanks for helping.
-
@Mconneen, Nice! It works for me. Thanks for posting that.
-
David.. if you copy / paste that into a formula.. should work.. you might have to resize the formula.. and yes... it is highly dependent on the source HTML.
-
I did that, expanded the formula box, and it still returned: ERROR Request failed: error
-
@David.. what platform are you on? Might have to wrap the http in a "do server" ..
-
Windows 7. I tried this:
let t := this;
let URL := "do server""https://tools.ietf.org/html/rfc7231";
let c := "http(method, url, header, body)";
let rt := html("");
let response := http("GET", URL);
if response.error then
rt := html("<h1>Error</h1><p>" + text(response.error) + "</p>");
alert(text(response.error))
else
rt := html(response.result)
end;
rt... and the error returned was Forbidden.
-
The URL is not correct.. see
https://ninoxdb.de/en/manual/api/http-calls
here is the sample code
let response := do as server
http("GET", "http://mytestservice.com/path")
end;
if response.error then
alert(text(response.error))
else
alert(text(response.result))
end
Content aside
- 5 yrs agoLast active
- 10Replies
- 3561Views