Re: Browser widget and javascript

2025-06-28 Thread Tom Glod via use-livecode
Sometimes triggering the callback is tricky, here is a simple working example. The widget has a javascript handler called "ReturnPageHeight" which receives the result in its first parameter command getPageHeight pBrowser local tScript -- JavaScript code to get the page's scrollable height

Re: Browser widget and javascript

2025-06-28 Thread Andreas Bergendal via use-livecode
Certainly! 1) put ”liveCode.MyCommand(T.length);" at the end of your JavaScript code. 2) Add ”MyCommand” to the browser widget’s javascriptHandlers (either by script or in the field for it in the inspector) 3) Add the handler ”on MyCommand pT” to the browser’s script (or your card script or sta

Browser widget and javascript

2025-06-28 Thread jbv via use-livecode
Hi list, When using a browser widget, I can get the whole code of a page displayed in the browser with : put the htmlText of widget "Browser" into myHtml I can also run chunks of javascript inside the browser, even if the code isn't there, for instance : do "var T=document.getElementsByCla