Other Side of the World Mobile Scrolling Tutorial
โœ‚๐Ÿƒ๐Ÿพโ€โ™€๏ธ๐Ÿƒ๐Ÿผโ€โ™‚๏ธ
๐Ÿ“–

Other Side of the World Mobile Scrolling Tutorial

Other Side of the World Mobile Scrolling Tutorial

It would be good for our โ€œOther Side of the Worldโ€ web application to work well on mobile platforms. This can be a big ask when you try to present a wide variety of data in some volume, using HTML iframe elements in a grid. However, there is a CSS bit of advice we use on table cells of all but the top row (tr) of our tableโ€™s cells regarding mobile scrolling (or momentum-based scrolling), that helps a lot, that being โ€ฆ



-webkit-overflow-scrolling: touch;

This mobile scrolling setting helps a table cell be fixed in position, but allow for its contents to be panned in any direction, meaning that the small widths of many mobile devices does not stop the effective use of our โ€œOther Side of the Worldโ€ web application, not just this one of ours, but others as well.

What else did we do today? Well, we woke up โ€ฆ and then we made a cofโ€ฆ oh yeah โ€ฆ sorry about that break with transmission โ€ฆ we added into โ€ฆ

  • the top right table cellโ€™s HTML iframeโ€™s latitude and longitude and placename of interest on clicking/touching (ie. accessing its Google Chart select event) now, if possible, will show a TimeZone name and GMT offset, and a Clock Time right now โ€ฆ and we added a โ€ฆ
  • new table row (that first we put down the bottom, but changed it to the middle) that can show a multi-place TimeZone Places webpage via the user selecting entries off a new HTML select (dropdown) element with multiple property set, and activated via the click/touch of a new HTML input type=button labelled โ€œDisplay โ€ฆโ€

And what else did we do on yesterdayโ€™s tomorrow? Well, we fed the dogs, and the cat, and the fish โ€ฆ drank the cofโ€ฆ oh sorry โ€ฆ looks like we are sidetractedtracked again โ€ฆ you may have heard about the viewport meta tag โ€ฆ we added between <head> and </head> โ€ฆ



<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.25, maximum-scale=8, user-scalable=yes" />

โ€ฆ to allow for overall webpage two finger gesture pinching (and spreading) for webpage zooming purposes.

The other CSS tip that is very apt (and often crucial) for mobile platform web application work is to try to use percentage (%) values for HTML element width properties to try to think independently of the physical screen width dimensions of the device being used. If on using percentages for widths you are dissatisfied with things being too bunched up, it is the viewport meta tag that can help out, sometimes, with this problem.

Yet again, the code for this remains as just HTML (apart from the supervised PHP for the Google Chart interface) that you could call other_side_of_the_worldโšซhtm (changed in thisway for our HTML iframe mobile scrolling and (more) (software) integration purposes today, as with WordPress 4.1.1โ€™s Other Side of the World Mobile Scrolling Tutorial) if you like, or want to try out (or try out for a specific (argument) location, such as Montreal try out), again.



Previous relevant Other Side of the World Iframe Tutorial is shown below.

Other Side of the World Iframe Tutorial

Other Side of the World Iframe Tutorial

Our โ€œOther Side of the Worldโ€ web application weโ€™ve been developing lately has made extensive use of the HTML iframe element, mainly as a โ€œreaderโ€ of data in that Client Pre-emptive Iframe technique way. But the HTML iframe element is probably better known for its data integration and display talents, and it is these that we call upon today (as for WordPress 4.1.1โ€™s Other Side of the World Iframe Tutorial), to (software) integrate two other existing sources of data so that, display-wise we have four table (td) cells in play now those being the original โ€ฆ

  • top left cell where the user interacts to show latitude and longitudes and placenames of interest
  • top right cell showing these โ€œlatitude and longitudes and placenames of interestโ€ paired with their โ€œOther Side of the Worldโ€ counterparts within a Google Charts Map Chart (software) integration โ€ฆ and, as of today we add into the equation โ€ฆ
  • bottom left cell where depending on whether weโ€™ve derived our โ€œlatitude and longitudes and placenames of interestโ€ from โ€ฆ
    1. the Weather Underground HTML select (dropdown) element results in an HTML iframe element hosting a Weather API via Iframe jQuery Ajax Autocomplete Tutorialโ€˜s TimeZone Places dataset โ€ฆ or โ€ฆ
    2. the useful webpage (thanks) HTML select (dropdown) element results in an HTML iframe element hosting a YouTube Embedded Video in Iframe API RegEx Tutorial โ€˜s YouTube (embedded) video integrator
  • bottom right cell where the userโ€™s โ€œlatitude and longitudes and placenames of interestโ€โ€˜s โ€œOther Side of the Worldโ€ interfaces to the useful webpage (thanks) HTML select (dropdown) element results in an HTML iframe element hosting a YouTube Embedded Video in Iframe API RegEx Tutorial โ€˜s YouTube (embedded) video integrator

We now think the use of all this can have you hopping around the world discovering lots of geographical based, video based and timezone based information about lots of places around the world, lots of which you may never have known much about.

Weโ€™ve software integrated today, as well as integrated โ€œwhereโ€ web application thoughts with โ€œwhenโ€ web application thoughts.

Another feature of todayโ€™s changes involves the geolocation features of the Javascript โ€ฆ



navigator.geolocation.getCurrentPosition(success[, error[, options]])

โ€ฆ syntax method of allowing Location Services, if allowed by the user, return a latitude and longitude position of the user themselves, information used at the instigation of the web application, and which we also used with HTML/Javascript Where Does It Get Me To Primer Tutorial and Google Chart Map Chart Select Event Primer Tutorial in the past.

The code for this remains as just HTML (apart from the supervised PHP for the Google Chart interface) that you could call other_side_of_the_worldโšซhtm (changed in thisway for our HTML iframe (software) integration purposes today) if you like, or want to try out (or try out for a specific (argument) location, such as Alice Springs try out), again. It also required small changes to โ€ฆ

We hope you try it out and discover some new things!


Previous relevant Other Side of the World Onblur Tutorial is shown below.

Other Side of the World Onblur Tutorial

Other Side of the World Onblur Tutorial

The onblur event in web programming is a very important event regarding interactive keyboard entries made by the user. We base new functionality, today, with our โ€œOther Side of the Worldโ€ web application, by allowing a user who enters in their own โ€œplaceโ€ information, can have that information filtered through the same โ€œautocompleteโ€ database provided by the wonderful Weather Underground and its great API service.

When we presented the last Weather Underground related blog posting we even used this functionality also interfacing to the onkeyup keyboard event, making it look up the database after just a few characters typed into the associated HTML input type=text text box, but today we lessen the interaction, presuming the user knows a location of interest and will only want information after tabbing out of this text box โ€ฆ hence the onblur event, only, logic interface to new functionality that creates an additional HTML select (dropdown) element of use to populate those same โ€ฆ

  • placename
  • country โ€ฆ linked to โ€ฆ
  • latitude
  • longitude

โ€ฆ fields as talked about yesterday when we presented Other Side of the World Places Tutorial as shown below.

So thatโ€™s the idea, but making it happen involved some tweaking of the parts to the Weather Underground blog posting Weather API via Iframe jQuery Ajax AutoComplete Tutorial from some time back, the changes for which weโ€™ll explain later.

Again we call on Client Pre-emptive Iframe techniques for this, telling us that you can just keep on adding HTML iframe elements to make this technique happen for several different sources of information, as necessary.

The code for this is just HTML (apart from the supervised PHP for the Google Chart interface) that you could call other_side_of_the_worldโšซhtm (changed in thisway for our onblur event purposes today) if you like, or want to try out (or try out for a specific (argument) location, such as Darwin try out), again. It also required small changes to โ€ฆ


Previous relevant Other Side of the World Places Tutorial is shown below.

Other Side of the World Places Tutorial

Other Side of the World Places Tutorial

A fair while ago now we were in the midst of writing a Geographicals Suite of web applications that, given Latitude and Longitude pairs you could calculate things like โ€ฆ

  1. Sun Angle at noon
  2. Moon Angle at noon
  3. Coriolis Effect
  4. Distance between Geographical Locations
  5. Weather at Geographical Location

โ€ฆ and that we eventually added some โ€œplacenameโ€ capabilities to all this, introduced with PHP/Javascript/HTML Sun Angle Tutorial, which harnessed all this useful goodwill of this useful webpage (thanks) publishing some placename geographicals data.

  • placename
  • country โ€ฆ linked to โ€ฆ
  • latitude
  • longitude

โ€ฆ and that we โ€œchannelโ€ today, via our beloved Client Pre-emptive Iframe techniques, so that we reuse PHP, rather than having to create new PHP, as an aid to the modularization for added โ€œplacenameโ€ functionality to our โ€œOther Side of the Worldโ€ web application we started presenting yesterday with Other Side of the World Primer Tutorial as shown below.

Another thing we are trialling today is a concept (that admittedly seems to need more work in Firefox) of an HTML select (dropdown) element having an onclick event (after an onchange event that changes that select element value to a non-nothing value) having a logic whereby that select element value is used to repopulate the โ€ฆ

  • placename (, country) (Great Circle Distance in km away)
  • latitude
  • longitude

โ€ฆ HTML input type=text and type=number fields automatically. In the normal case of events in non-Firefox web browsers an onchange event change of value to a non-nothing value just causes that select element value to be one of the places shown on the Google Charts Map Chart that we display.

The default is to show five of the nearest placenames in the derived list, but a โ€œ+โ€ button can increase that number of โ€œnearestโ€s as required.

The code for this is just HTML (apart from the supervised PHP for the Google Chart interface) that you could call other_side_of_the_worldโšซhtm (changed in thisway for our purposes today) if you like, or want to try out, again perhaps?


Previous relevant Other Side of the World Primer Tutorial is shown below.

Other Side of the World Primer Tutorial

Other Side of the World Primer Tutorial

Today weโ€™ve written a first draft of an โ€œOther Side of the Worldโ€ web application using a Google Chart Map Chart embedded into an HTML iframe element to show the user โ€ฆ

  • the position of the place that they enter in for their latitude and longitude โ€ฆ as well as โ€ฆ
  • โ€œthe other side of the worldโ€ to the position of the place that they enter in for their latitude and longitude, calculated by imagining you take a trip from your original location through the middle of the Earth and straight through onto the other location

Is this our โ€œsisterโ€ location? Am not sure. But somebody was telling โ€œPorkiesโ€ to me as a child where we were told โ€œChinaโ€ as being on the other side.

The code for this is just HTML (apart from the supervised PHP for the Google Chart interface) that you could call other_side_of_the_world.html if you like, or want to try out.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in eLearning, Event-Driven Programming, Tutorials and tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *