B4J Question WebApp - 2 Wobsocket pages - Use different page for the same resources (css, js, images etc.)

hatzisn

Well-Known Member
Licensed User
Longtime User
This is the case.

I have a subfolder for a web socket page where all these files are located (css, js, images) and I want to display two different pages with the same resources.
I thought of the solution of writting to the servletresponse but, obviously (not for me at that time), there is no servletresponse in a websocket application.
Then I though: "ok, let's use a div and set to this jquery element the html as read from the file.". I cannot do this on load but only after interaction (i could use also here some help). No success though. Event though the correct HTML is displayed I cannot interact with the controls although they are there and visible. I do not know how to handle this. Anyone can help with this? Is there any function in the web socket I could call?

Is the only solution two sub folders with the same files or move the files to the parent folder and access them from two different folders with links?

The fact is that I would like to use dynamically created jquery tables and I cannot see (now at least), how to do it.
 
Last edited:

Daestrum

Expert
Licensed User
Longtime User
Could you not put the 'common' css in a folder in WWW

ex
folder for css = www/commoncss

in websocket page
<link rel="stylesheet" type="text/css" href="../commoncss/mycss.css" />

(I'm no expert so this could be utter rubbish)
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
Could you not put the 'common' css in a folder in WWW

ex
folder for css = www/commoncss

in websocket page
<link rel="stylesheet" type="text/css" href="../commoncss/mycss.css" />

(I'm no expert so this could be utter rubbish)

No, it is correct. I already mentioned it but I was hopping I would not have to parse the entire page to change the relative paths of all files (because experience tought me never to change anything massively in code).
 
Upvote 0
Top