Comment by JohnP on Fixed position footer scrolls in iPhone X
Thanks man, but this approach doesn't work either. It appears that the body height appears to be larger than the viewport height. Trying a couple of other variations on this.
View ArticleComment by JohnP on Fixed position footer scrolls in iPhone X
I have the content wrapped in a div, but that didn't seem to work. I'm trying a few other variations of this now.
View ArticleComment by JohnP on php date format YYYY-MM-DD minus or add one week from now?
@hexYeah I don't think you're correct. The commenter is just adding a fixed number of seconds to the timestamp. DST is taken into consideration after the timestamp has been modified, it's got nothing...
View ArticleComment by JohnP on Use variable outside the success function from an...
Generally you'd show a loading indicator to the user and wait till the server response is received.
View ArticleComment by JohnP on Hide Database Login Information in PHP Code
The safest way to deal with is to have a mykeys.php.sample file that lists all of the keys that the app uses with all of the values empty. The values can either then be manually filled in by the user...
View ArticleComment by JohnP on Can't send call to client
If you're having trouble where even the console.log directive is not showing the correct output have you checked whether the file you're editing is being loaded? Maybe add an additional console.log in...
View ArticleComment by JohnP on Oauth error invalid_request: The redirect_uri is not...
You likely have a typo or something on your whitelist. Check out this github issue - github.com/Shopify/shopify_app/issues/486
View ArticleComment by JohnP on Get text of the selected option with jQuery
@B-shan Only replying to this because of the confusing downvote. The posted solution works just fine and only returns the HTML of the selected option, not all HTML associated with that ID (as you...
View ArticleComment by JohnP on Push files in a input of type file
Thanks, I updated the answer. It's almost a decade old now.
View ArticleComment by JohnP on jQuery: enable submit when min 1 checkbox is checked
@JanusBahsJacquet Answered almost a decade ago, I've added your comment, thanks!
View ArticleComment by JohnP on How to use a php result set from a query in JavaScript
@mickmackusa This answer is from 10 years ago, tbh I don't even remember why I added an unnecessary eval in there. Anyway, I've updated it, thanks.
View ArticleComment by JohnP on Use dynamic variable names in JavaScript
@BuSaeed Not sure I understand, if the variable is already local scope, can't you just refer it to it by name? You should probably ask a new question as this is an old question with a different meaning.
View ArticlePaginating data by last active when rows constantly change
I'm looking for pagination approaches to be used on data that is constantly changing (around 1 - 3 updates per minute). I have a conversation list with the following structure conversation : id,...
View ArticleAnswer by JohnP for How to Truncate Table using CakePHP?
NOTE: This answer is valid only up to CakePHP 1.3. I haven't used this on the never versions so I've no idea whether it works.deleteAll only deletes the data, it does not truncate the table.You'll need...
View ArticleAnswer by JohnP for Hammer.js breaks vertical scroll when horizontal pan
User patforna is correct. You need to adjust the touch-action property. This will fix scrolling not working when you have hammer bound on a big element in mobile.You create a Hammer instance like so...
View ArticleAnswer by JohnP for jQuery does not show content with setTimeout
You need to wrap your jQuery call in a function$.ajax({ url: 'content.php', data: '&go='+ tab, success: function (data) { setTimeout(pencil, 3250); //pass in a function reference preferably....
View ArticleAnswer by JohnP for Jquery find is not working
$('.popular_prd').find('.view-content')This will just return a jQuery object which never evaluates to falseYou need to check the length of itif(!$('.popular_prd').find('.view-content').length) { //no...
View ArticleAnswer by JohnP for Binding events in jquery (double event on click...)
Well, if you want to bind two methods to the same event you can simply put them in one method and call it. I've never bound two methods to the same so can't comment on why the dual binding is...
View ArticleAnswer by JohnP for Linking page in a div with html forms and php
Since you've tagged jQuery, I'll use a jQuery example$(document).ready(function(){ $('form').submit(function(){ $('#content').load('code.php'); return false; })})This makes a couple of assumptions...
View ArticleAnswer by JohnP for Error in creating a websocket connection within a hybrid app
The solution to this is to use the httpd module in Trigger.Setting up the httpd server makes the app be served with a http://localhost URL instead of the contents: or file: protocol. With this in...
View Article