tag:blogger.com,1999:blog-4818542164384221282.post7500392667828480593..comments2024-03-25T17:53:49.828+08:00Comments on Grassroots Oracle: About CSS SelectorsScott Wesleyhttp://www.blogger.com/profile/18106937181788036683noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-4818542164384221282.post-10303150767007957232016-03-23T21:56:59.515+08:002016-03-23T21:56:59.515+08:00Yes, using css based selectors along with jquery i...Yes, using css based selectors along with jquery is great and is very lightweight. But components like spinner or progress bar, which get invoked by calling a function (for e.g. apex.util...) tend to create other components too along with the main component. (for e.g. in older versions of apex, a translucent layer is also created along with progress bar)<br /><br />Sometimes, these components might get unnoticed or unhandled, by using css and jquery independently on such interdependent components. <br /><br />So, I prefer using the javascript code style that i mentioned in my previous comment. <br /><br />Regarding using it in a variable, I could get the value of returned dom element in javascript global variable as :<br /><br />--- Page Level - Function and Global Variable Declaration --<br /><br />var g;<br />function setg(i)<br />{<br /> g=i;<br /> console.log('g=');<br /> console.log(g);<br />}<br />function getg()<br />{<br /> return g;<br />}<br /><br /><br />-- Javascript code on click of button 1 (handled by dynamic action)<br /><br />var i = apex.util.showSpinner();<br />console.log(i);<br />setg(i);<br /><br /><br />-- Javascript code on click of button 2 (handled by dynamic action)<br /><br />var i = getg();<br />console.log(i);<br />i.remove();<br /><br />-------<br /><br />I am a little skeptical about getting value in page item rather than global javascript variable. But I will try it some day.<br />Anonymoushttps://www.blogger.com/profile/09710783708993088108noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-57622891730917163822016-03-23T21:20:17.265+08:002016-03-23T21:20:17.265+08:00I imagine that will be the more common invocation ...I imagine that will be the more common invocation method, until a deferred action/promise executes.<br /><br />Can you elaborate on what you mean with your final sentence?Scott Wesleyhttps://www.blogger.com/profile/18106937181788036683noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-5852799259617659942016-03-23T20:56:50.601+08:002016-03-23T20:56:50.601+08:00There is one more way to do that.
When activating...There is one more way to do that. <br />When activating a spinner, get DOM object in a javascript variable, as :<br /><br />var i = apex.util.showSpinner();<br /><br />Which can later be removed by javascript code :<br /><br />i.remove();<br /><br />Value for i can also be saved in a page item, which can later be used in normal javascript code.Anonymoushttps://www.blogger.com/profile/09710783708993088108noreply@blogger.com