Jump to content

sparkz

uniGUI Subscriber
  • Posts

    7
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    UK

sparkz's Achievements

Newbie

Newbie (1/4)

2

Reputation

  1. The .js file is included in the server CustomFiles: files/push_notification.js I'm calling the following on a button click in the client main form: procedure PushNotification(sTitle, sMessage: String); var sJS: String; begin sJS := Format('jQuery(document).ready(function($){$.notify("%s",{title: "%s", icon: ""});});', [sMessage, sTitle]); UniSession.AddJS(sJS); end; But I get the following error: I can put the JS code into the script directly and it works fine but I can't get the interaction between calling the "notify" function and the library .js file to work. I assume it's not finding the library? It seems to be one of those aspects not well documented, I'd really appreciate if someone could tell me what I may be missing... JSTest.zip
  2. Fenix, this looks like a really useful bit of code. I'm new to the java side and am struggling to get this to work - I get "$.notify is not a function" errors. I suspect because I haven't setup things correctly. Have you got a sample project with this or some other bit of JS so I can learn from it. Thanks
  3. Gerhard, that's a much better solution. I must get into this Java code a bit more...
  4. Hi Walter I was exploring this for very similar reasons. I did look into Java solutions, to no avail, but what I did in the end was to just use the UniGUI version of the Indy TIdHTTP component (uIdHTTP). Using it on the client side in the Login form creation event. sExtIPAddress := HTTP.Get('http://checkip.amazonaws.com'); I do use a few sites to check the address like "http://ipecho.net/plain"as well. Pretty basic and I'm not too sure of the downside of doing it this way but it seems to work for the moment at least. I'd be interested to know if you or anyone has any alternate solutions to this? Mark
×
×
  • Create New...