On Wednesday, July 10, 2019 at 6:19:00 AM UTC-7, Quang Lam wrote:
but this one still cause the section id "thisone" execute when the page is loaded. i want this one to hold off until the user right click and select an option in the menu because the section id "thisone" needs the information of the row on which the user right click. if this section id "thisone execute before the user right click, some of the variables will be empty
"Execute" may be a poor term for a non-procedural language like HTML and CSS. Javascript, of course, is procedural, and "execute" is a natural term there.
In any case, if a DIV is declared when the page is loaded (that is, <DIV id=x> is in the html file), it's contents and attributes are evaluated then. They can be changed. The onclick handler can change contents, just as it changes the visibility attribute.
The other approach is to not have the DIV in the html file, and to use the onclick handler to insert the DIV into the DOM. The trick to that is to have the id of the element that the DIV is inserted into.
Finally, you can use the LOAD() helper to replace an empty DIV with the content returned from a request to the server (that's different from copying from another element, as in propagating the cell contents from a grid entry). It's a wrapper for AJAX, and I believe it uses jQuery under the hood. And if you need more control, you can unwrap the jQuery and do it yourself.
I'm not the javascript expert in the group, but I've done various bits of this.
/dps "on my good days I might pass as a journeyman jscripter"