Master-details is a very useful feature but the details table may clutter the UI. We have seen projects where people have more than a dozen details tables and it would be useful if we can hide some that are not relevant to the current master table record.

Let us take a look at this completely artificial example. A typical setup with Orders table as a master and Order Details, Employees, and Customers as details. We would like to hide the Employees table tab when OrderID is more than 10300.

Continue Reading "Hiding details table tab on the fly"

Knowing where your web applications users location is a useful feature, that can help you provide a better service. For instance, you can show them results that are tailored to their location or display their location on the map or convert latitude/longitude to a street address. There is a handy Geolocation API in Javascript that can provide the user’s location, we just need to find the way to pass this data to the server-side and save it in session variables. We want to get this…Continue Reading “Using geolocation data in your web application”

In the current world situation, all countries track new and existing cases of COVID-19. Some countries provide an API to access the latest data. Here is an API provided by Hong Kong’s department of health. Today we will learn how to display this data in our own application. Applies to version 10.4 of PHPRunner, ASPRunner.NET and ASPRunnerPro.

Creating the REST View

1. Lets see how we can display data for March 2020. We added a filter for ‘As of date’ field to show data that contains ’03/2020′ in this field (they use UK date format). Click ‘Get result’ and we will see both API query string and the data it returns.

2. Now, lets take a look at the URL:

https://api.data.gov.hk/v2/filter?q=%7B%22resource%22%3A%22http%3A%2F%2Fwww.chp.gov.hk%2Ffiles%2Fmisc%2Flatest_situation_of_reported_cases_wuhan_eng.csv%22%2C%22section%22%3A1%2C%22format%22%3A%22json%22%2C%22filters%22%3A%5B%5B1%2C%22ct%22%2C%5B%2203%2F2020%22%5D%5D%5D%7D

We can paste it to the web browser and get the same results in JSON fomat. Now it is the time to create a REST connection. The https://api.data.gov.hk/v2/ part of the URL is the main connection URL.

Continue Reading "Working with third-party REST API"

When we added a new record and returned back to the List page that new record may not be clearly visible on the page. Depending on what page we on, what sort or is applied, how many records are on the page – we may simply be on the wrong page. This can be useful when, for instance, you are transferring a large amount of data from paper to the database and this kind of visual indication can be helpful to keep track of the process.

In this article, we will show you a technique that does the following. After the new record is added we find out which page it belongs to, redirect the user to that page, highlight the record and also scroll the page if the record is below the fold.

Continue Reading "Making new record visible on the List page"

Tri-part events are a special code snippets that provide a convenient way of programming interactions between the browser and the webserver.

Why three parts?

Any web application consists of two parts – server and client. The client part runs in the browser on the computer of the web site visitor. This part takes care of all user interface interactions, such as buttons, input controls, blocks of text and images. Client-side code is written in Javascript in most cases.

Server part – this code runs on the webserver itself and has direct access to the database, can send emails, read and write files to the disk. In PHPRunner-created applications server code language is PHP, ASPRunner.NET uses C# or VB.NET, ASPRunnerPro uses Classic ASP.

Most real-life tasks though require a joint action of both client and server parts. For example, the user presses a button and wants something changed in the database, or an email being sent.
Tri-part events provide a relatively easy way to create such integrated code snippets.

They consist of three parts running one after another:

  • Client Before – this Javascript code is run immediately after user’s action such as pressing the button.
  • Server – this part runs on the server after the Client Before part has finished. You can only user server-side code here (PHP, C# or ASP).
  • Client After – back to the web browser, another Javascript code part.
Continue Reading "Tri-part events"

There was an article posted back in 2007 in our forums that provided a solid start for many SEO-friendly URLs applications. It is about time to talk about how you can implement it in version 10.x of PHPRunner, ASPRunnerPro, and ASPRunner.NET. We have helped one of our clients to implement this solution in their project. They run a website that lists public voters’ information in certain Florida counties. The objective is to make these pages rank high when someone searches for county, city or neighborhood…Continue Reading “SEO-friendly pages in your web application”

If you purchased or upgraded PHPRunner, or ASPRunner.NET less than one year ago logon to control panel and find download links and registration keys under ‘My purchases’. There should be ‘Reg info’ link next to your latest upgrade purchase.

Note: Software maintenance coverage needs to be continuous. If your last purchase or upgrade were more than one year ago you have till June 20, 2019 to renew your maintenance. After that date you will have to purchase PHPRunner, ASPRunner.NET or ASPRunnerPro at the full price.

New customer purchase links:
PHPRunner
ASPRunnerPro
ASPRunner.NET

Upgrade/maintenance renewal links:
PHPRunner
ASPRunnerPro
ASPRunner.NET

What’s new in version 10.2

Collapsible menu bar

Hide/collapse menu bar on the left. This feature is inspired by AdminLTE template.

Continue Reading "Version 10.2 of PHPRunner, ASPRunner.NET and ASPRunnerPro is here"

This is a weekend project, not much practical use but it was fun to create. Hopefully you find techniques mentioned here useful.

Some our employees need to connect to our FTP server while travelling. As an extra protection measure we maintain a whitelist of IP addresses where connection is allowed from. We thought it would be nice to convert IP addresses to geographical coordinates and display them on a map. It worth saying that IP to latitude/longitude conversion is not 100% accurate and IP addresses get re-assinged all the time. However for our task it is not really important.


Continue Reading "Displaying IP addresses on the map"