Jump to content

andyhill

uniGUI Subscriber
  • Posts

    1268
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by andyhill

  1. Sherzod, Please advise how to force in code at runtime a horizontal Scroll-To-Top for a HtmlFrame (after the script has been updated) - thanks.
  2. Set Flag in Server Module BeforeInit to suit (we have multiple frameworks). As stated above clearly, I need to scroll to the top of the HTMLFrame via code at runtime after script update. Project1.zip
  3. Subject to user interaction we change the contents of a HTMLFrame (our frame has a pre-specified height):- BeginUpdate Clear script EndUpdate The previous contents were many many lines long forcing the user to scroll to bottom, now that we have new contents I want to reposition to the top. How Can We Force Scroll-To-Top in code ?
  4. In the past I have built many Knowledge Base Repositories (Windows Applications) around graphical interfaces which I personally find easy to search / navigate to find related information. LbaWeb (Live Blood Analysis [for the web]) is my UniGUI port of one such program. I have attached a fast paced video showing what can be accomplished using graphical menus in a sort of non-traditional way - Expanding Horizontal Top Menu (parent), Expanding Left Vertical Menu (child), Expanding Right Vertical Menu (independent) and Center Info Display (grandchild). lbaweb3.mp4
  5. I use ImageEn for all of my jpg/png/avi manipulation including text overlay on the server side.
  6. Ron, back to Rifer Pro, I would be happy to investigate your Rifer Pro S/W with Scalar: Spooky2 GX Twin Generators
  7. UniImage1.AutoSize:= True; // DOES NOT WORK UniImage1.Url:='images/myimage.png'; // LOADS // Work Around below corrects size but need image to be centered UniImage1.JSInterface.JSCode('Ext.defer(function(){var el='#1'.el.select("img").elements[0]; '+ 'el.style.maxWidth = "100%"; '+ 'el.style.height="100%"; }, 20);'); After work around above, UniImage1.Center:= True; now works.
  8. Here is my function to strip HTML tags out of Text:- function TUniMainModule.StripHTML(S: String): String; var TagBegin, TagEnd, TagLength: Integer; MyStr: String; begin TagBegin:= Pos( '<', S); while (TagBegin > 0) do begin TagEnd:= Pos('>', S); TagLength:= TagEnd - TagBegin + 1; Delete(S, TagBegin, TagLength); TagBegin:= Pos( '<', S); end; MyStr:= S; if Pos('&nbsp; &nbsp;', MyStr, 1) > 0 then begin MyStr:= CRLF + MyStr; end; StringReplace(MyStr, #160, ' ', [rfReplaceAll, rfIgnoreCase]); MyStr:= Trim(MyStr); Result:= MyStr; end;
  9. ' <body> '+#13#10+ ' <canvas id="bodyCanvas" width="640" height="480" style="border:1px solid #000000;"> '+#13#10+ ' <h3 style="margin-left:10px;" "margin-right:40px;"> '+#13#10+ ' Sample text '+#13#10+ ' </h3> '+#13#10+ ' </canvas> '+#13#10+ ' <button onclick="javascript:downloadImage()">Download Canvas</button> '+#13#10+ ' </body> '+#13#10+
  10. I tried a canvas tag but my rendered html always appeared below the canvas rectangle. How do we get the BODY RENDERED CANVAS ?
  11. Hi, I am trying to use some code from the Internet and no matter what I do I have getContex errors, please advise (drawCanvas() rectangles were for visually tracking only) - thanks. MainHTMLFrame.HTML.BeginUpdate; MainHTMLFrame.HTML.Clear; s:= '<!DOCTYPE HTML> '+#13#10+ '<html lang = "en"> '+#13#10+ ' <head> '+#13#10+ ' <script> '+#13#10+ ' function drawCanvas() '+#13#10+ ' { '+#13#10+ ' var canvas = document.getElementById("bodyCanvas"); '+#13#10+ ' if (canvas.getContext) '+#13#10+ ' { '+#13#10+ ' var ctx = canvas.getContext("2d"); '+#13#10+ ' ctx.fillStyle = "rgba(125, 46, 138, 0.5)"; '+#13#10+ ' ctx.fillRect(25,25,100,100); '+#13#10+ ' ctx.fillStyle = "rgba( 0, 146, 38, 0.5)"; '+#13#10+ ' ctx.fillRect(58, 74, 125, 100); '+#13#10+ ' } '+#13#10+ ' } '+#13#10+ ' function downloadImage() '+#13#10+ ' { '+#13#10+ ' var canvas = document.getElementById("bodyCanvas"); '+#13#10+ ' if (canvas.getContext) '+#13#10+ ' { '+#13#10+ ' var image = canvas.toDataURL(); '+#13#10+ ' var aLink = document.createElement(''a''); '+#13#10+ ' var evt = document.createEvent("HTMLEvents"); '+#13#10+ ' evt.initEvent("click"); '+#13#10+ ' aLink.download = ''image.png''; '+#13#10+ ' aLink.href = image; '+#13#10+ ' aLink.dispatchEvent(evt); '+#13#10+ ' } '+#13#10+ ' } '+#13#10+ ' </script> '+#13#10+ ' </head> '+#13#10+ ' <body id:="bodyCanvas"> '+#13#10+ ' <h3 style="margin-left:10px;" "margin-right:40px;"> '+#13#10+ ' Sample text '+#13#10+ ' </h3> '+#13#10+ ' <button onclick="javascript:downloadImage()">Download Canvas</button> '+#13#10+ ' </body> '+#13#10+ '</html>'; MainHTMLFrame.HTML.Add(s); MainHTMLFrame.HTML.EndUpdate;
  12. Usually it is some sort of js issue when the session is no longer valid
  13. I use HTML Frames and update HTML contents (script) via menu choice
  14. Mehmet, do you have a StandAlone Desktop / Mobile example ?
  15. I use this for Labels, perhaps Edit has the same attributes ? lblSupplierOne01.TextConversion:= txtHTML;
  16. My quick and nasty work around sacrifices image quality and excludes audio. I would love to have the original image quality and accompanying audio so still need help. ' <script>'+ ' function fallback(video)'+ ' {'+ ' var img = video.querySelector(''img'');'+ ' if (img) video.parentNode.replaceChild(img, video);'+ ' }'+ ' </script>'+ ' <video autoplay loop muted playsinline>'+ ' <source src="images/waves.mp4">'+ ' <source src="images/waves.webm" onerror="fallback(parentNode)">'+ ' <img src="images/waves.gif">'+ ' </video>'; You can see the results by looking at our experimental website (testing different HTML concepts [non traditional]) https://axfite.com.au Check out Blood and Waves using both Desktop and then iPhone/iPad.
  17. Desktop works fine. <video id="video-tag-1" width="395" height="471" controls muted playsinline autoplay loop> <source src="images/blood.mp4" type="video/mp4"></source> Your browser does not support the video tag. </video> iPhone iOS 14 fails to play perhaps due to the new power management changes. I have read the video tag must be "muted" which it is, also must have "playsinline" which it does. There is also some chatter about Safari/iOS now uses HTTP byte-ranges for requesting audio and video files. Can someone please advise how to use html "video" tag with UniGUI/Indy byte-ranges for iOS ? Playing around "<source src="images/blood.mp4" type="video/mp4"> Range:bytes=0-100000</source>" fictional byte range does not make any difference, also where do I place it. This is very important for UniGUI to address as Apple (iOS = 4% of all web traffic) and Mobile in general (= 12% of all web traffic) increasing daily. The video must be played inline within other rendered html content. Please advise - thanks in advance
  18. For what it is worth, I mostly develop using the UniGUI Mobile Components that can be emulated in Desktop Mode (\m), unless of course I need a quick and nasty desktop solution. So no more scale down issues trying to fit into phone real-estate - yes I know some code self adjusts but it is never as good as mobile specific code. In this way when rendered on phone everything is finger friendly and screen size correct.
  19. I had a quick look and found:- ////////////////////////////////////////////////////////////////////////////// ' function sendRequest(data) {'#10+ ' console.log(data);'#10+ ' //var URLFrame = Ext.getCmp(''_URLFrame'');'#10+ FAILS ??? ' var params=[];'#10+ ' params = ["val="+JSON.stringify(data) ];'#10+ ' if (params.length > 0) {'#10+ ' //ajaxRequest(URLFrame, ''findaddress'', params);'#10+ FAILS NO AJAX FUNCTIONS ' //ajaxRequest(MainForm.UniURLFrame1, ''findaddress'', params);'#10+ FAILS NO AJAX FUNCTIONS ' }'#10+ ' }'#10+ At least data now goes to console. ////////////////////////////////////////////////////////////////////////////// Knowing that ajaxRequest is not implemented I thought you could use:- s:= 'ajaxRequest=function ajaxRequest(sender, url, data)'#10+ '{'#10+ '}'; UniURLFrame1.ClientEvents.UniEvents.Add(s); But need help from Sherzod to implement MainForm.UniURLFrame1, ''findaddress'', params
  20. andyhill

    UniURLFrame

    Process UniURLFrame OnAjaxEvent (add Listener if necessary).
×
×
  • Create New...