A AHilton Active Member Licensed User Longtime User Sep 12, 2018 #1 I'm just getting started with the whole jQuery <-> B4J thing so bear with me ... I could do this by building my html directly from B4J but I'd like to try this using a static html file and dynamically fill in the spaces (so to speak) of that file. In that file, I have a placeholder <select> with an id. Now, I need to fill that drop-down with <option>s from my B4J web socket class. I see that this can be done with a jQuery ".append" but I don't see that available in B4J. Right? I guess the question is ... how do I add <option>s to a <select> from my web socket class?
I'm just getting started with the whole jQuery <-> B4J thing so bear with me ... I could do this by building my html directly from B4J but I'd like to try this using a static html file and dynamically fill in the spaces (so to speak) of that file. In that file, I have a placeholder <select> with an id. Now, I need to fill that drop-down with <option>s from my B4J web socket class. I see that this can be done with a jQuery ".append" but I don't see that available in B4J. Right? I guess the question is ... how do I add <option>s to a <select> from my web socket class?
Erel B4X founder Staff member Licensed User Longtime User Sep 12, 2018 #2 AHilton said: I see that this can be done with a jQuery ".append" but I don't see that available in B4J. Right? Click to expand... You can call anything you want with RunMethod. Upvote 0
AHilton said: I see that this can be done with a jQuery ".append" but I don't see that available in B4J. Right? Click to expand... You can call anything you want with RunMethod.
A AHilton Active Member Licensed User Longtime User Sep 12, 2018 #3 Hmmm... It was just as simple as Code: Copy SelectPeople.RunMethod("append", Array as Object($"<option value="joeblow">Joe Blow</option>"$)) for adding a single choice. Upvote 0
Hmmm... It was just as simple as Code: Copy SelectPeople.RunMethod("append", Array as Object($"<option value="joeblow">Joe Blow</option>"$)) for adding a single choice.