andyhill Posted July 16, 2022 Share Posted July 16, 2022 With DeskTop UniHTMLFrame I could add this script and call it at runtime via AddJS:- ' function rotateImg(id) '+ ' { '+ ' var img = document.getElementById(id); '+ ' if (!img) {return null} '+ ' img.style.transform = "rotate(180deg)"; '+ ' } '+ ' function markImg(id) '+ ' { '+ ' var img = document.getElementById(id); '+ ' if (!img) {return null} '+ ' img.style.border = "3px solid red"; '+ ' } '+ ' function unMarkImg(id) '+ ' { '+ ' var img = document.getElementById(id); '+ ' if (!img) {return null} '+ ' img.style.border = "0px solid red"; '+ ' } '+ UniSession.AddJS('markImg("Cart")'); QUESTION: How do I make this work inside a Mobile TUnimDBListGrid new XTemplate ? Quote Link to comment Share on other sites More sharing options...
andyhill Posted July 17, 2022 Author Share Posted July 17, 2022 Sherzod, can you please show me how to add script functions to DBListGrid XTemplate <img tag OnClick and how to call function via AddJS ? Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 18, 2022 Share Posted July 18, 2022 Hello, Have you searched the forum for a solution? Quote Link to comment Share on other sites More sharing options...
andyhill Posted July 18, 2022 Author Share Posted July 18, 2022 Yes, searching the forum and documentation is always the first thing I do. I understand that Grids and XTemplates are not the common way developers go but it does allow for ones imagination to be realized. I will soldier on ... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.