Jump to content

COMFIED

Members
  • Content Count

    90
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by COMFIED

  1. Any idea how I can add Strict Transport Security header to the code to force the browser to access website only via https?
  2. Tried but still unable to get it to work. For example, how do I insert the script into a panel or button to display the advert?
  3. II would like to insert the online advertisement script below inside an iframe my smartmobilestudio code. Tried but getting errors. Is there an easy way to do this? <script type="text/javascript"> atOptions = { 'key' : '000000', 'format' : 'iframe', 'height' : 60, 'width' : 468, 'params' : {} }; document.write('<scr' + 'ipt type="text/javascript" src="http' + (location.protocol === 'https:' ? 's' : '') + '://abc123/invoke.js"></scr' + 'ipt>'); </script>
  4. Yes this works. Thanks
  5. I am try to clean up a JSON string from {"v":"this is sample text"} with the aim of obtaining the text value: this is sample text I have tried JSON.parse as follows, but it doesn't seem to work string_value := JSON.parse('"'+string_value+'"'); What is the correct way of doing this?
  6. Another code security question - is there a way of detecting if the files in the \res folder have been modified? How can I access timestamps, files size and other parameters of graphics and html resource files?
  7. I am building a financial transaction system on sms. Is there a way to detect/prevent code tampering? - so that in case the compiled HTML/ JS code is modified it will refused to run.
  8. Thanks It works - but with app loading lag in slow connections. Can the script be loaded during button click instead of app loading?
  9. I am trying to integrate PayPal payment buttons using the script below via W3DIVHtmlElement.InnerHTML The app fails to run when I embed the script. How can I can use the PayPal script in the app? <div id="paypal-button-container"></div> <script src="https://www.paypal.com/sdk/js?client-id=XXXYYYZZZ&currency=USD" data-sdk-integration-source="button-factory"></script> <script> paypal.Buttons({ style: { shape: 'rect', color: 'gold', layout: 'vertical', label: 'pay',
  10. I am trying to create a web app (to be wrapped using phonegap into android app) that needs permissions enabled. On load, the app should check and prompt the user to enable android permissions for sending SMS android.permission.SEND_SMS and enable access of camera within the app android.permission.CAMERA. How can I do that using smart mobile studio?
  11. I would like to populate a hidden memo field with text, and then download the contents as a text file by clicking on a button. Any ideas on how I can do that?
  12. Thanks jarto It works! Is there a way to make the W3DIVHtmlElement scroll vertically like a browser when there is more content than fits in display size - scroll just like W3IFrameHTMLElement?
  13. Another way of asking the same question: Can I pass parameters via URL without reloading the web app?
  14. I have a W3IFrameHTMLElement with content that contains URL links. Is there a way to format the URL links in W3IFrameHTMLElement content so that I can click on them and access within the web app?
  15. COMFIED

    Audio File Cache

    I am playing online audio mp3 files from a web source. I would like the audio files to cache after playing, so that I can replay when offline. Is there any way of achieving this?
  16. Hi Is there a way to trigger a combobox to expand and show the list without clicking on it - by using code under another visual component like a button?
  17. COMFIED

    Favicon

    Hi Is there a way to automatically add head links to a page favicon .ico in the root or res folder via code?
  18. Thanks a lot! This fixes the problem
  19. This works and copies text to clipboard browserapi.document.designMode := 'on'; asm navigator.clipboard.writeText("copy this text"); end; I'm still unable to introduce a string variable from label or input box to replace "copy this text" - Any idea how I can do that?
  20. Any help on how I can click a label/ text to copy to clipboard? Here is my code, but its not working. procedure TForm1.W3Label1Click(Sender: TObject); begin W3Label1.Caption:= '<id="ACC">1234'; var document.getElementById('ACC'); copyText.select(); document.execCommand('copy'); ShowMessage("Copied the text: " + copyText.value); end;
  21. Hi Any ideas on how to detect long press or taphold on a panel or label?
  22. I have noted the problem - the event listener fires only once- on load, then ignores all events after that. I am calling bindEvents in the InitializeForm; Is there a way to listen to events as long as the app is running?
  23. I'm getting a type error, cannot read property preventDefault´╗┐ of null
×
×
  • Create New...