B4J Question How come WebSocket_Connected is not being reached?

B4JExplorer

Active Member
Licensed User
Longtime User
I solved a similar problem, by just starting from scratch the other day. There doesn't seem to be any problem, with getting hand-written or cloned html, to work with B4J.


But working with Third Party-generated html, is presenting issues.

The attached is a simple example, no external css, just a simple B4J app, using Web Sockets, and a single Text box. It's generated from an Html designer, then exported.

The text box gets shown correctly, but the WebSocket_Connected routine is never reached.

What am I missing? Is there another javascript module that should be pointed to?
 

Attachments

  • ThirdPartyDesignerTest.zip
    24.1 KB · Views: 187

B4JExplorer

Active Member
Licensed User
Longtime User
I've changed the index.html, putting the js links and b4j_connect("/ws") call, in locations that make more sense (to me, anyway). But the WebSocket_Connected routine, is still not executing.
 

Attachments

  • ThirdPartyDesignerTest.zip
    24.1 KB · Views: 193
Upvote 0

rwblinn

Well-Known Member
Licensed User
Longtime User
Hi,

pls find attached a revised index.html and index.css for your test project. Clicking on the label is logged in B4J.
 

Attachments

  • index.zip
    904 bytes · Views: 187
Upvote 0

B4JExplorer

Active Member
Licensed User
Longtime User
Whoa! I just saw that the design tool I was using, inserted script references, ABOVE, the doctype tag. That's funny, because I specifically configured it, to place certain references towards the bottom of the page. Also, it didn't insert any jquery links. What the...?

Ok, thanks rwblinn. I'll see if I can coax the tool, to put everything in the proper order.
 
Upvote 0

B4JExplorer

Active Member
Licensed User
Longtime User
I use this editor: http://brackets.io/?lang=en

It is not a designer but it allows you to see the changes as they occur in a connected browser.

Yeah, I've seen Brackets, but haven't tried it yet. Will take a look, thanks Erel.


Currently, I'm using Coffee Cup as an editor, and Wysiwig Web Builder http://www.wysiwygwebbuilder.com as the designer, which exports to html. Both of them, just take some getting used to.

Can't thank you enough, for helping to make web development much more streamlined.
 
Upvote 0
Top