B4J Question Frames in WebApp

peacemaker

Expert
Licensed User
Longtime User
Hi, All

Is it possible to use the HTML frames in WebApp ?

Say, index.html is:
B4X:
 <frameset rows="50%,50%" cols="50%,50%">
    <frame src="topleft.html" name="topleft" scrolling="yes" noresize>     
    <frame src="topright.html" name="topright" scrolling="yes" noresize>
    <frame src="bottomleft.html" name="bottomleft" scrolling="yes" noresize>
    <frame src="bottomright" name="bottomright" scrolling="yes" noresize>
 </frameset>

And some handler is to be generating top*.html and bottom*.html files, that can be long, scrollable (tables from the database)...
And the handler should intercept clicks in all 4 frames.
Is it possible ?
If yes - how handler should be set up ?
 

FrostCodes

Active Member
Licensed User
Longtime User
Yes since it is a web app, all HTML features should be available. Try as much as possible to avoid Es5+ features in javascript if you are targeting Android 4 (or less) but from 5, you should be able to use most especially with a polyfill library offline like babelJS.

As for intercepting the events, if it is on Android you intend on wrapping it in, use WebViewExtras2 and add a Chrome client(essential).
Then you can use the callSub part to route events.
 
Last edited:
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
It's for B4J server app planned only, for big screen, a db admin panel. Maybe any other suggestion how to make better ? Several paginating tables
 
Upvote 0

FrostCodes

Active Member
Licensed User
Longtime User
You can do it like this

index.html
....frame1.html
....frame2.html
....frame3.html
....frame4.html


So the index page serves as the page that receives all data and tells other frames what to do.
Read this: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage

it would help you understand how to communicate back and forth with frames.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…