B4J Question Help with the JQuery (load) command in WebApp.

Omar Moreno

Member
Licensed User
Longtime User
Hi all.
I am testing IDE: B4J 9.10 and JQuery: 3.6.0
In a main page (index.html) I have two <button> and a <div> to load the pages, the first button is in charge of calling the page (home.html) the second button is in charge of calling the page ( guess.html).
To load the pages I have always used the html <object> tag, but now I am trying to load them in a <div> tag with the JQuery load command.
Both pages load fine, but when I load the guess.html page, the program no longer works when trying to switch to the home.html page.
If I disable the b4j_connect("/ws1") script the pages are loaded, but obviously the JQueryElements of the guess.html page no longer work.
Note: on the guess.html page disable the scripts:
<script src = "js / jquery-3.6.0.min.js"> </script>
<script src = "js / b4j_ws.js"> </script>
If they enable them, they generate a warning in the browser:
jquery-3.6.0.min.js: 2 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

I have attached the test program
Any suggestions to use the JQuery load command with b4j_ws.js
Thanks for your possible answers.
 

Attachments

  • B4J_JQuery_Load.zip
    35.9 KB · Views: 163

Omar Moreno

Member
Licensed User
Longtime User
What is the purpose of this complex configuration? Why not make the home page a simple html page that opens the relevant WebSocket pages?

Hi.
Using iframe, object or embed, I have to calculate the height of the embedded page.
The JQuery (load) command automatically adjusts the height of the container div.

Test2.png


Test3.png


Thanks for answering.
 
Upvote 0
Top