Error in creating a websocket connection within a hybrid app
I have an app that uses socket.io (1.4.5) to establish a websocket connection. The app is available via a web URL and also as a packaged Android app using Trigger.io. The Android app is unable to...
View ArticleFixed position footer scrolls in iPhone X
I have a hybrid HTML5 app created using the Trigger.io framework. The app contains a fixed footer and a scrolling content area. The app works fine on all devices except the iPhone X. On the iPhone X...
View ArticleAnswer by JohnP for puppet-common (= 3.8.7-1puppetlabs1) Installling Error
Your mileage may vary but the only way I could get around this problem was deleting all the puppet related .list files in /etc/apt/sources.list.d.Files were...
View ArticleAnswer by JohnP for Configuring Envoy to use SRV records generated by AWS ECS...
Posting the solution I ended up going with. I setup Consul to work as a discovery service. Basically a Consul sidecar would run alongside every cluster/webservice I have. When the webservice comes...
View ArticleConfiguring Envoy to use SRV records generated by AWS ECS and Route53
I'm using AWS ECS to deploy multiple web services (via Docker images) that are behind an Envoy front proxy. Some of these docker images have multiple deployed instances.I'm currently using the service...
View ArticleDefer loading of images without the use of JS
I want to defer the loading of images in an HTML file until after all other assets have loaded or for a set amount of time. I would like to do this without JS. I already use a deferred image loading...
View ArticleAnswer by JohnP for RAW SQL Query with Zend Framework
If you're creating a Zend_DB object at the start you can create a query using that. Have a look at this entry in the manual : https://framework.zend.com/manual/1.12/en/zend.db.statement.html$stmt =...
View ArticleAnswer by JohnP for Run function after user has stopped typing
Here's a rough draft : http://jsfiddle.net/jomanlk/msmJp/Uses setTimeout and clearTimeoutvar timer = null; $('#text').keyup(function(){ clearTimeout(timer); timer = setTimeout(doStuff, 1000) });...
View Articlewindow.close() doesn't work on iOS
I open a new window with window.open() to redirect users to the oauth login page. However, after successful login when the user is redirected back to my app the previous window with the window.open...
View ArticleAnswer by JohnP for Getting Data from Node.js file and displaying it in...
You should start by setting up a server to serve requests. I use expressjs for this - http://expressjs.com/This will allow you to run nodejs as a web application.Setup a route in express JS to serve...
View ArticleAnswer by JohnP for how to stop retry HTTP call when server servers respond...
This test code seems to work fine for me. I created a request that just randomly spits out a number, which is used in the retry callback.I'm using PHP 7.3 and the latest version of Guzzle and the...
View ArticleCookies not being sent back and forth properly in Opera
First off, I'm not sure whether this is a problem in Opera 12.01 or not, but the problem only occurs in Opera. I've tested in FF14, Chrome 21, Safari 5 (Windows) and Safari Mac and Webkit browsers on...
View ArticleAnswer by JohnP for How do I refresh a page using JavaScript?
You're spoiled for choice; any of the following work:window.location.href = window.location.href;window.location.reload();history.go(0);
View ArticleAnswer by JohnP for Changing element style attribute dynamically using...
Assuming you have HTML like this:<div id='thediv'></div>If you want to modify the style attribute of this div, you'd usedocument.getElementById('thediv').style[ATTRIBUTE] = '[VALUE]'Replace...
View ArticleAnswer by JohnP for How do I run the system commands in JavaScript?
You can't run system commands on the client with JavaScript since it works inside a browser sandbox. You'd need to use some other client-side tech like Flash, ActiveX or maybe applets.
View ArticleSwiftkey keyboard on ios hides text input
I have a simple page with a text input at the bottom. On ios with the default keyboard selected, when the user clicks on the text input the input is pushed up and the user is able to enter text (see...
View ArticleSetting map language to English in Openstreetmap with LeafletJS
I'm using LeafletJS to add a map component to my app. Everything is fine and dandy except for the localization of the map. Some country names are shown in the local language (I'm assuming). Is there a...
View Article