linein designs

Archive for the ‘programing’ Category

This is a more practical way to display an image or text while an AJAX request is loading. DEMO | DOWNLOAD FILES What we’re basically doing is forcing a DIV to have a starting image and then replacing it with the text return from the AJAX request. function loadingAjax(div_id) { $(“#”+div_id).html(‘ saving…’); $.ajax({ type: “POST”, [...]

This is an addition to the Find Time Between Two Dates in PHP post. Here is a quick way to find the years and months between two dates using PHP. The dates are not exact since we’re assuming that each year and month has the same number of seconds. function yearMonthDifference($start_date, $end_date) { // 31556926 [...]

I could not figure out why I kept on getting the following error being returned : < ?xml version="1.0" encoding="utf-8"? > Error E00003 The ‘AnetApi/xml/v1/schema/AnetApiSchema.xsd:validationMode’ element is invalid – The value ” is invalid according to its datatype ‘AnetApi/xml/v1/schema/AnetApiSchema.xsd:validationModeEnum’ – The Enumeration constraint failed. This error is caused by the field validationMode being empty. Spent [...]

Tags:

Earlier this week I had an interesting problem. I needed to have some javascript code run from within the page being called via AJAX. The javascript relied on the values being set in the page being called so it could not be setup on the page before hand. It had to be called afterward. It [...]

This one about drove me crazy all night trying to think of why this does not work and to be honest I still don’t understand why it doesn’t. But below is a solution to the problem. The problem was I was trying to close a popup and force the parent page to load a URL [...]

26 Feb, 2009

PHP Font Preview Function (text to image)

Posted by: john In: php|programing

For work we needed a way to allow the customer to preview what their Bible imprint text would look like before they placed their order. I’m sure there are ways to do this with JavaScript, but we chose to do this with PHP to prevent the site from relying on Javascript (there was already enough [...]

Tags:

The other day we ran into a good problem that our site has grown and we are in need of a new server. So we ordered the server and now we need to transfer all the files from the old server to the new one. But rather than downloading all the files to our local [...]

I’m just finishing up a little project to improve the search ability on a website and I want to display an image and message say “loading…” until the script finished running. Below is an easy way to do that. UPDATE: Please view the updated way to do this that is a little more practical in [...]

Here’s the follow-up article on how to easily get file sizes nicely formated. Below is a quick function that will display the file size in KB, MB, or GB all easily accessed through a function. function formatbytes($file, $type) { switch($type){ case “KB”: $filesize = filesize($file) * .0009765625; // bytes to KB break; case “MB”: $filesize [...]

Tags:

04 Apr, 2008

Find Time Between Two Dates in PHP

Posted by: john In: php|programing

Below is a quick PHP function that allows you to find the time between two dates. The dates must be in seconds from Unix Epoch. if(!function_exists(timeBetween)) { function timeBetween($start_date,$end_date) { $diff = $end_date-$start_date; $seconds = 0; $hours = 0; $minutes = 0; if($diff % 86400 0) { $rest = ($diff % 86400); $days = ($diff [...]

Tags:


  • john: There's no easy way to stop it within the InnerFade plugin, but you could just erase all the list items after you've cycled through them using jQuery.
  • Steven: Rachid, did you find an answer? Is there a way to stop by a picture at the end? Can anyone help? Thanks in advance!
  • htc smartphone: WP togo is going to be a great little example of just what kind of super-power these droids will offer like the htc aria and other htc mobile phones l


Please Support Our Friends

Send emails with ease on this SMTP server by JangoSmtp.com.

Banner

About

My name is John Veldboom and have been in design and web programing for just over 8 years now. Started off as a hobby in high school but it has developed into a full time job now. I always tell people that if I wasn't doing this at work each day, I would be at home doing it for free. I love it!

Please visit the contact page to drop me a message.