Jump to content

Mobile TUnimDBListGrid (config new XTemplate with <img id src png OnClick) Add/Remove Border Around Image At Runtime


andyhill

Recommended Posts

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 ?

 

 

Link to comment
Share on other sites

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 ...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...