B4J Question WebApp: Synthax Error on IE

JanPRO

Well-Known Member
Licensed User
Longtime User
Hi,

currently I try to create a WebApp. It works fine on Firefox, however Internet Explorer throws an error: SCRIPT5022: SyntaxError in JQuery.

I have created an example, which demonstrates the issue: -/-

When I remove b4j_connect("/main"); everythink works fine, so the error must be related to B4J.

Any ideas?

Have a nice weekend

Jan
 
Last edited:

JanPRO

Well-Known Member
Licensed User
Longtime User
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Works fine here:

SS-2016-12-04_11.32.00.png


Try to clear the browser cache.
 
Upvote 0

billzhan

Active Member
Licensed User
Longtime User
If you change the port to numbers other than 80 (HTTP) and 443(HTTPS), your webapp will work.

B4X:
    fullpath = ((l.protocol === "https:") ? "wss://" : "ws://") + l.hostname + ":" + l.port + absolutePath;

'If 80 port is used:
fullpath = ws://5.230.156.192:/main

fullpath can't be handled by IE 11.

You have to change b4j_ws.js
B4X:
fullpath = ((l.protocol === "https:") ? "wss://" : "ws://") + l.hostname + ":" + l.port + absolutePath;

===>

    var porti = l.port;
    if (porti ===""){
        porti = ((l.protocol === "https:") ? 443 : 80);
    }
    fullpath = ((l.protocol === "https:") ? "wss://" : "ws://") + l.hostname + ":" + porti + absolutePath;
 
Upvote 0
Top