Jump to content
uniGUI Discussion Forums

Search the Community

Showing results for tags 'javascript'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • uniGUI 1.x
    • Beta Releases
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 14 results

  1. Back on tracks ! This examples shows how to create "on-the-fly" a QrCode for on-line use. Very useful for products access , info. etc... The main and innovative difference to uniGUI community is that only uses a very small and practical JavaScript Lib to create a QrCode image associated to an uniCanvas that can be placed in position on your screen. Size and content is very easy to adjust. See code sample. As always you can download from https://t.me/uniguiexpress See Channel files... Or you may visit http://www.unigui.com.br and see other code packages and products. www.unigui.com.br-QrCodeGenerator.rar
  2. Projeto que demonstra o poder do uniGUI e sua produtividade para facilitar a construção/migração de projetos novos/legados. Versão Project that demonstrates the power of uniGUI and its productivity to facilitate the construction / migration of new / legacy projects. Version
  3. Greetings and Regards What did it do to call and use JavaScript functions in unigui? There are sample usage functions in the Html file @Sherzod @Farshad Mohajeri html.zip
  4. I have an application that populates a TUniStringGrid dynamically and the data is loaded based on the selected item from a specific list. Which could be solved by any of the 2 situations below: 1. How can I execute a line of JS code? or 2. How can I hide a column completely? Since there is no Visible property in Columns (only used Columns.width := 0) To elaborate: 1. The javascript is like this, $('.test').each(function () { $(this).css('display', $(this).width() == 0 ? 'none' : ''); }); I've tried UniStringGrid.JSInterface.JSCode('code here'); But it doesn't run. Alternatively, I've also used the ClientEvents.ExtEvents property, but this only works on the initial loading (placed on afterlayout) but when the data is changed, doesn't run anymore. 2. The columns appear as the image below Either solution to the 2 problems above would be great! Thanks!
  5. Hi All!! A PDF Viewer Panel - No Browser Plugin required, pure JavaScript Source: http://www.sencha.com/forum/showthread.php?237361-A-PDF-Viewer-Panel-No-Browser-Plugin-required-pure-JavaScript Demo: http://SunboX.github.com/ext_ux_pdf_panel/demo/ Github Project: https://github.com/SunboX/ext_ux_pdf_panel How to use: TRY... 1. Download files: http://sunbox.github.io/ext_ux_pdf_panel/lib/pdf.js/compatibility.js --> copy to directory (/files/pdf/) sunbox.github.io/ext_ux_pdf_panel/lib/pdf.js/pdf.js --> copy to directory (/files/pdf/) http://sunbox.github.io/ext_ux_pdf_panel/ux/util/PDF/TextLayerBuilder.css --> copy to directory (/files/pdf/pdf/) http://sunbox.github.io/ext_ux_pdf_panel/ux/panel/PDF.js --> copy to directory (/files/pdf/pdf/) http://sunbox.github.io/ext_ux_pdf_panel/ux/util/PDF/TextLayerBuilder.js --> copy to directory (/files/pdf/pdf/) 2. Add CustomFiles in UniServerModule: files/pdf/compatibility.js files/pdf/pdf.js files/pdf/pdf/PDF.js files/pdf/pdf/TextLayerBuilder.js files/pdf/pdf/TextLayerBuilder.css 3. Paste into a form UniHTMLFrame1 and add UniHTMLFrame1.HTML...: <div id="pdfviewer" align="center"></div> 4. procedure TMainForm.UniButton1Click(Sender: TObject); begin UniSession.AddJS('if (Ext.get("pdfviewerpanel")) {Ext.get("pdfviewerpanel").remove()};'); UniSession.AddJS('Ext.create(''Ext.ux.panel.PDF'', {' + 'id : "pdfviewerpanel", ' + 'title : ''PDF Panel'',' + //'width : ' + IntToStr(UniHTMLFrame1.Width) + ' ,' + //'height : ' + IntToStr(UniHTMLFrame1.Height) + ',' + 'width : 489,' + 'height : 633,' + 'pageScale: 0.75,' + 'src : ''http://cdn.mozilla.net/pdfjs/tracemonkey.pdf'', ' + 'renderTo : "pdfviewer"' + //'renderTo : Ext.getBody()' + '});'); end; Best regards.
  6. Jean-Marc Kiener

    pascal on client side

    Are there plans to write client events in pascal too? Something like this? https://github.com/bytbox/pas2js Anyone knows morfik ( http://www.morfik.com/)? With this dev-tool you are able to write in pascal for client and for server side. Client side pascal will then compiled into javascript. Great concept, very elegant. But unfortunatly morfik is not maintained anymore. Cheers!
  7. Sherzod

    D3 for Data-Driven Documents

    Hi Friends, In my opinion another excellent javascript library D3 for data visualization (and not only) ... D3.js is a JavaScript library for manipulating documents based on data. D3 helps you bring data to life using HTML, SVG and CSS. D3’s emphasis on web standards gives you the full capabilities of modern browsers without tying yourself to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation. http://d3js.org/ examples Best regards.
  8. WagnerAlexandre

    TUniImage mouse over

    Hello friends, I would like to know how to change the image of a TUniImage when the mouse passes over. Thank you very much in advance.
  9. eduardo.junqueira

    Call delphi method for JavaScript ?

    For instance, would pafina made ​​in html and plain javascript , calling a unit method of Delphi , it is possible ?
  10. Sistema Fenix

    Alert with delay

    Hello, Sharing the things I'm learning. Example of how to call a function by external js unigui. This alert is pretty cool. Sincerely Alert.zip
  11. Hi, I want to use third party javascript library for my web front end, so I search posts for how to use javascript library like c3js working under uniGUI, I found uniHtMLFrame component can do it, following is my steps: step1: ServerModule.pas -> CustomFiles -> Add css/c3.css js/d3.v3.min.js js/c3.js step2: Main.pas -> Add UniHTMLFrame1\ UniButton1\ UniButton2\ UniButton3 Click UniButton1 Load html file into UniHTMLFrame1. Click UniButton2 Update Web Front End with javascript code random numbers. Click UniButton3 Update Web Front End with uniGui(delphi code) random numbers. procedure TMainForm.UniButton1Click(Sender: TObject); begin HTML.HTML.LoadFromFile('files\simple.html'); end; procedure TMainForm.UniButton2Click(Sender: TObject); begin UniSession.AddJS( 'var chart = c3.generate({ ' + ' data: { ' + ' columns: [ ' + ' [''data1'', Math.random()*1000, Math.random()*1000, Math.random()*1000, Math.random()*1000, Math.random()*1000, Math.random()*1000], ' + ' [''data2'', Math.random()*1000, Math.random()*1000, Math.random()*1000, Math.random()*1000, Math.random()*1000, Math.random()*1000] ' + ' ], ' + ' onclick: function (d, element) { console.log("onclick", d, element); }, ' + ' onmouseover: function (d) { console.log("onmouseover", d); }, ' + ' onmouseout: function (d) { console.log("onmouseout", d); }, ' + ' } ' + '}); ' ); end; procedure TMainForm.UniButton3Click(Sender: TObject); var data1: array[0..5] of Integer; data2: array[0..5] of Integer; i: Integer; begin for i := 0 to 5 do begin data1[i] := Random(1000); data2[i] := Random(1000); end; UniSession.AddJS( 'var chart = c3.generate({ ' + ' data: { ' + ' columns: [ ' + ' [''data1'', ' + IntToStr(data1[0]) + ', ' + IntToStr(data1[1]) + ', ' + IntToStr(data1[2]) + ', ' + IntToStr(data1[3]) + ', ' + IntToStr(data1[4]) + ', ' + IntToStr(data1[5]) +'], ' + ' [''data2'', ' + IntToStr(data2[0]) + ', ' + IntToStr(data2[1]) + ', ' + IntToStr(data2[2]) + ', ' + IntToStr(data2[3]) + ', ' + IntToStr(data2[4]) + ', ' + IntToStr(data2[5]) +'], ' + ' ], ' + ' onclick: function (d, element) { console.log("onclick", d, element); }, ' + ' onmouseover: function (d) { console.log("onmouseover", d); }, ' + ' onmouseout: function (d) { console.log("onmouseout", d); }, ' + ' } ' + '}); ' ); end; simple.html <html> <head> <!-- link rel="stylesheet" type="text/css" href="../css/c3.css" --> </head> <body> <div id="chart"></div> <!-- script src="../js/d3.v3.min.js" charset="utf-8"></script --> <!-- script src="../js/c3.js"></script --> <script> var chart = c3.generate({ data: { columns: [ ['data1', 30, 200, 100, 400, 150, 250], ['data2', 50, 20, 10, 40, 15, 25] ], onclick: function (d, element) { console.log("onclick", d, element); }, onmouseover: function (d) { console.log("onmouseover", d); }, onmouseout: function (d) { console.log("onmouseout", d); }, } }); </script> </body> </html> The code run smoothly and I attach uniGUI project including csj3. If you have more concise code, let me know. My question: Is there more easy and Efficient method to interface between Server End and Front End javascript? because I need to monitor some modbus device like thermometers or switches connecting to my uniGUI server directly, and updating the display accordingly, and it is realtime monitor and quick response, the smaller traffic between server and web front is welcome. thermometers <-- Modbus TCP/RTU --> uniGUI server <-- javascript --> web front (C3js) Thanks Farshad Mohajeri, Delphi Developer, mohammad et al for your valuable posts. C3js.rar
  12. Hi, I tried implementing server side javascript with mormot SpiderMonkey, SyNode. I always get an error : Project XXXXX.exe raised exception class $C0000005 with message 'c00000005 ACCESS_VIOLATION' When running the same lines of code in a VCL application everynting works fine. The exception Is raised in Spidermonkey Unit in the line : function JS_NewRuntime(maxbytes: uint32; maxNurseryBytes: uint32; parentRuntime: PJSRuntime): PJSRuntime; cdecl; external SpiderMonkeyLib; What should I do? Is mormot's implementation incompatible with uniGui? If so what are my alternatives? Thanks...
  13. FastCards

    Javascript and UniURLFrame

    I've got the Google Charts API thing working (thanks to the poster who posted the sample code, I will post my code when it's all working) Basically, I build the HTML in Delphi code (which I know inside out) then pass that HTML to a UniURLFrame and it displays fine. All is good with the world. However, if I want to re-draw the chart because the user has selected different options, it doesn't work. If I assign new HTML to the UniURLFrame it doesn't draw and produces errors. Without going into detail, these errors are caused because I have already loaded things and created things in the Javascript HTMl the first time round. My question is this: is this the right way to do this sort of thing (i.e. assign HTML to a UniURLFrame) or is there a better way to do it? If this was in Windows development, you would clear what had gone before, then change the HTML then call a refresh method or the like to load in the new HTML. I know this isn't how JavaScript works but any pointers would be gratefully received. Thanks and all the best to all in the Unigui community :-) Andy
  14. Dear friends! CoolClock is a customisable javascript analog clock. http://randomibis.com/coolclock/ Demo: http://randomibis.com/coolclock/demos/demo2.html A simple usage example: 1. Download coolclock.js, moreskins.js and excanvas.js and put them in "/files/coolclock/" folder. 2. Add the module untClock.pas to the project untClock.zip 3. ... and frmClock.Show(); Try... Best regards.