Android Question Web App

luke2012

Well-Known Member
Licensed User
Longtime User
Hi to all,
I'm implementing a web app using Web socket classes and HTML5 + JQuery as front end.

I'm using a DIV within the HTML5 page in order to show the HTML table returned by the ExecuteHTML within the called Web socket class.

The html inside the DIV is populated using .SetHtml(html) within the Web socket class.
The problem is that I'm not able to access the table rows using the standard Jquery selectors and methods.

Any suggestions ?
 
it seems the dom doesn't get updated right so jquery doesn't find what you need (or you have actual bugs)

try something like

<tr onclick=myfunction(yourid);>

instead
 
Upvote 0
Thanks 4 the reply!
It works fine.
I have only a problem with the parameters.
When I pass a string that contains blank chars the js raise an error :

B4J code
Code: Copy
sb.Append("<tr onClick=myfunction('" & cur.GetString2(1) & "'); >")

JS code
Code: Copy
      function myfunction (par){
        alert(par);
      }

I got the following error "Uncaught SyntaxError: Unexpected token ILLEGAL" because as function parameter I pass a string with whitespaces.
 
Last edited:
Upvote 0
It shouldn't do that, you only need to cover that when sending it over as query string.
 
Upvote 0
Back
Top