0

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

null
    • Mconneen
    • 4 yrs ago
    • Reported - view

    @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.. 

    • David
    • 4 yrs ago
    • Reported - view

    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? 

    • Mconneen
    • 4 yrs ago
    • Reported - view

    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

    • David
    • 4 yrs ago
    • Reported - view

    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. 

    • Sean
    • 4 yrs ago
    • Reported - view

    @Mconneen, Nice! It works for me. Thanks for posting that.

    • Mconneen
    • 4 yrs ago
    • Reported - view

    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. 

    • David
    • 4 yrs ago
    • Reported - view

    I did that, expanded the formula box, and it still returned: ERROR Request failed: error

    • Mconneen
    • 4 yrs ago
    • Reported - view

    @David.. what platform are you on?  Might have to wrap the http in a "do server" .. 

    • David
    • 4 yrs ago
    • Reported - view

    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. 

    • Mconneen
    • 4 yrs ago
    • Reported - view

    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

  • 4 yrs agoLast active
  • 10Replies
  • 3546Views