Jump to content

SantoshGnostice

Members
  • Posts

    13
  • Joined

  • Last visited

Recent Profile Visitors

359 profile views

SantoshGnostice's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. Yes, thank you. I have started working in that direction.
  2. I have found an example implementation in UniGUI that may suit what I am looking for. The method "uniGUIDialogs.Prompt" takes a callback function which is called from the client-side once the user dismisses the dialog. Is there something similar which we can use when developing a custom component? How is the the Delphi callback procedure linked to the client-side callback?
  3. Hi Just checking if there is anything to use for the above situation? Calling an async JS function from the server and getting response from it?
  4. A simple example of what I am looking for: Server-side: procedure CallBack(AResult: string); begin // Control comes here after timeout end; JSAsyncCall('method', CallBack); Client-side (JS): method: function(callback) { setTimeout(callback, 1000, 'result'); } I could use ajax to achieve this but I'd have to maintain a mapping on the server of all the callback functions and call them appropriately when the message arrives from the client. I am sure UniGUI must have solved this problem already - so I was looking to see if the framework has something I can use to achieve this.
  5. I am looking for server side method which can invoke a JavaScript function that takes a callback and later asynchronously calls this callback which should result in a server-side call. Basically an async version of existing JSCall method which can take an anonymous function or a delphi callback. Is there such a method already present?
  6. Farshad, this is unexpected since in regular HTML/JS the iframe's src attribute is not set by default and hence the "load" event does not fire when the page is loaded with an empty frame. Perhaps Ext JS is setting the frame's src attribute to 'about:blank'?
  7. BTW your suggestion and code prompted me to do a workaround for this. Now I am checking the iframe's "src" attribute and ignoring the first event. function frameload(sender, frame, eOpts) { // For some unknown reason (bug?) this event is called when the parent form loads and // the frame is still empty. So ignore it if the src is blank. var frameDivId = MainForm.UniURLFrame1.id; var frame = $('#' + frameDivId + ' iframe'); var src = frame.attr('src'); if (src === 'about:blank') { return; } // ... }
  8. I need to run some JS in response to the frame load hence the reason for me to use the client-side event. I seem to be getting answers suggesting workarounds which I appreciate but unfortunately those won't work for my need. I believe the errant behavior is due to a bug either in UniGUI or in Ext JS.
  9. @mohammad my situation is a bit different. Let me try to explain with a simple example. I have a main form on which I have a button and a TUniURLFrame (which is basically an iframe element in HTML). When the user clicks the button I load another website inside the TUniURLFrame. I want to be notified when the iframe has finished loading the external website. For this I am trying to use the TUniURLFrame's ClientEvents -> ExtEvents -> frameload event which should fire after the external website is done loading completely inside the iframe. There is no other way for me to find out the completion of the load. This all works fine except for the issue where when my application main form is loaded the TUniURLFrame's frameload event is being fired though there is nothing for it to load (it's URL property is empty when the app starts).
  10. This appears like a bug to me. How do I raise a bug report about this? I don't have permissions to create a new topic in the bug reports forum.
  11. Hi I have a form with a frame inside which is initially empty and at a later point I set a URL to the frame to load a page. I need some JS to be run after the frame has loaded the page. For this I have setup a handler under ClientEvents -> ExtEvents -> frameload as shown below: function frameload(sender, frame, eOpts) { alert('Viewer loaded!'); } However I am finding that this event is fired twice. Once when the application is loaded. And again later when I set a URL to the frame and the frame is done loading the page. The second firing is fine but I don't understand why it's firing the first time when nothing is loaded in the frame. Apprecitiate the help!
  12. @Stefano, thank you for mentioning our products It looks like linking the form fields to a dataset is a really popular need. We will take this feature up immediately and report back once it's implemented. Right now with StarDocs you can load a PDF form, fill it, save it back to the PDF, print it and "post" the form data to a URL. @wprins, StarDocs is available as two variants. One is hosted in the cloud and another is available as an on-premises server that you can host within your network. With on-premises server your documents are secure within your network. You can download a trial of the on-premises server here. This is available as a virtual appliance so it's easy to deploy without having to worry about OS, dependencies, etc. If you don't already have a virtualization platform (ex: VMWare) you can download the free VirtualBox to host the StarDocs virtual appliance.
×
×
  • Create New...