purple oar software

"Ensuring Your Web Presence Contributes"

web development

Javascript errors, line numbers from IE

admin's picture

Recently I received an email from Gary who tried out my shareware Javscript editor, ScrypTik. I tried to reply directly, but his email bounced. Gary's question was a good one, so I'll answer it here as it may help others.

Question:

I have downloaded a copy of ScrypTik and I like what it can offer. However, I have the following issue which is typical of my application:

I have a PHP file which refers to numerous js files

e.g.
When running the PHP, The IE browser (v7) will refer to a line number "line 706: character 3" which bears no relation to my PHP source file. It seems to be erroring on some Javascript at run-time. I know this is a run-time error since it occurs in specific situations.

What is the best way of locating the error with your product?

My Answer:

Javascript code filter for Drupal

admin's picture

Here is an explanation of how I wrote a Drupal5.n module to filter javascript code so that it displays syntax highlighted. To illustrate what it does:-

/*
 * comment block
 *
 */


// single line comment


function
example(a,c) {
  return
a * c * 59;
}


document
.writeln("this is a text string");
document
.writeln('so is this, single quoted');

If the code is just a single line it will display without the background div:

var myDiscount = 0.25;

The filter system within Drupal is intended to make data entry into the CMS easy and safe. URL's can become clickable and malicious HTML (and rude words) can be stripped out. This js_filter module, based on the contributed codefilter module by John Wilkins, will syntax highlight Javascript code. There are already ways to do this within Drupal, the geshifilter module which uses the third-party GeSHi PHP library will syntax highlight many languages and there is also a jQuery plugin, jquery-chili-js which uses "recipes" for several languages.

js_filter has no software dependencies, it is purely PHP module code.

Web story, the beginning

admin's picture

Every web site owner has a story or three to tell.

Most web site owners want to make money from their site.

Lots of web sites offer advice on how to do this (jargon "monetize"). Probably the most popular business on the Internet is how to make money on the Internet! They urge you to buy their latest snake oil system which will have you earning indecent amounts of money in hardly any time at all. Their spiel is awash with numerous testimonials from customers draped over their latest Ferrari/beautiful significant other which proves how much money they are making.

Beware, low flying pigs!

Website Redesign

Today, many websites need revamping. They were built years ago and don't compete very well. People browsing the web are using larger monitors and "wide" screen laptops figure significantly in analysis statistics. An old "fixed width" layout of 760 - 800 pixels can appear ridiculous on these modern screens.

We are happy to re-vitalise your web presence with new ideas and modern techniques. If you answer "no" to any of the following, please get in touch with us.

  • Is the site fresh and up to date?
  • Is it user friendly?
  • Is it a "fluid" width layout thats looks good on larger high resolution monitors?
  • Does it create a professional image?
  • Is it search engine friendly?
  • Is it creating leads and/or sales?
  • Is it fast to load on dial-up?
  • Is it web standards compliant?
  • Is it easy for you to alter?

A web site redesign can make a big difference to your business. Other questions you may think about are:

  • Why do visitors come to your site?
  • What can you learn from your competitors?
  • What is the mood or emotion you want to convey?
  • Who is your target audience?
  • Is your content up to date?
  • Will your visitors believe you?
  • What can you learn from your site statistics? (Do you have statistics?)
  • Is your site's navigation up with the play?
  • Do all your visitors speak English? We develop multi-lingual sites.

Going Live!

For a web site to be accessible to the billions of surfers out there, several things must happen. You need:

  • a Domain Name
  • hosting
  • to transfer your site to the host
  • to get noticed by the search engines

We can do all of this for you, or you can do all or some yourself. You can pay upfront or pay a monthly amount, we are very flexible!

Domain name

This is the address of your website, the bit that usually looks like "www" dot "yourSiteName" dot "yourPreferredExtension". "yourSiteName" should be your business name if possible, there are good and bad ways to deal with this, we are happy to advise. "yourPreferredExtension" is the type of site and the country code, eg .org.uk indicates an organisation located in the United Kingdom. Again, there are pros and cons to various extensions, we are happy to advise. Sometimes the domain name you want is not available, so you have to compromise. Its important to think about this carefully.

Once you have chosen a Domain name, it needs to be "registered". There are hundreds of domain name registrars in the world. Prices and support vary widely. Your Domain name is valuable and needs to be registered with a trustworthy registrar. You may feel more confident dealing with a local registrar rather than one on the other side of the world. There's no such thing as a free lunch, so be careful of the low price registrars. Having said that, there are low price registrars that are completely reliable, talk to us.

Hosting

If you are a small company/organisation, you will probably start out on the web using "shared hosting". This is where the web server is shared amongst maybe 1000 clients. This may sound like too much for one web server, but it depends on hardware, software and loadings. Reliable hosting companies would never overload a server so that your site appeared unduly slow or unresponsive. Like Domain name registration, there is a wide variety of hosting pricing and quality. Hosting companies usually offer "reseller" plans which suit web developers who then claim they have their "own" hosting. Just be aware that hosting offered in a particular country may be "reselling" hosting domiciled in another country (typically the USA). You need to ask probing questions to avoid being taken advantage of.

If you have too much traffic for shared hosting, you can use semi-dedicated (or virtual private server) hosting or have your own web server. This can be housed at a web hosting company (telehousing) and controlled remotely, or you can have your web server physically on your own premises connected to the internet. If you run your own server, you will need advice on security and how to have minimum outages, we all expect 100% uptime!

Transferring your site to the Internet

Usually, a new site is developed on a local computer and moved to the web server when it is time to "go live". This involves transferring files using ftp (file transfer protocol), setting up robots.txt and maybe .htaccess and if necessary loading database tables.

Get noticed by Search Engines

You can submit your site to search engines or have another site that is already being spidered link to your site. For google, we believe the best way is to submit a google sitemap. If you are not too comfortable with this sort of thing, we can do it for you, just ask.

Alarm bells!

While being involved with web sites, we have come across several situations that you should be wary of.

  • If any web developer attempts to charge you, say every six months, for "submitting to search engines", then you are being ripped off! Once you are in the search engines index, you will stay there unless something disastrous happens. This could be a serious loss of hosting, your domain name expiring or being banned by a search engine for dubious content. In fact, repeatedly submitting to a search engine could annoy them, not a good idea.
  • You may be tempted to get your site developed by a friend/neighbour/relative who has learnt a bit of HTML and makes really cool looking web pages. This is probably a bad idea, because a web site should be regarded holistically, everything counts. Amateurs forget about search engine optimisation, keyword research, identifying your target audience and what the site is for. Remember our slogan - "Ensuring Your Web Presence Contributes", looking pretty is not enough.
  • Often, a web hosting package includes a free domain name, and this seems attractive. However, if or when you want to change host, you may find because they control your domain name, you have difficulty doing this. It is better to register your domain name yourself, and get hosting separately. That way, you have more control.

Purple Oar Software

Purple Oar Software is Paul Roper, previously a tutor at a local tertiary Institute of Technology, who is available to provide Information Technology consultancy. I work closely with other independent peers (such as copywriters and graphic artists) as required. The use of "we" throughout this web site means appropriate associates and myself.

I have taught a range of Information Technology subjects at Diploma and Degree level and have a particular interest in web site development. Website development requires many skills such as:

  • programming
  • database design and administration
  • network administration
  • correct use of the English language (grammar, spelling and appropriate style)
  • graphic design.

Purple Oar Software is expanding through recommendations from satisfied clients. I am available on mobile phone and email virtually 24/7 to provide client support.

A Javascript authoring tool developed and sold by Purple Oar Software has its own website. This site operates in a niche market selling a product used by web developers worldwide. ScrypTik has sold in the USA, Canada, Australia, UK, the Netherlands, Germany, Switzerland, Italy, Poland, India, South Africa, United Arab Emirates and New Zealand. Sole traders through to large corporates such as IBM, Bellsouth and The Bank of Ireland use it.

This acceptance of ScrypTik is testimony to our technical competence, however the most significant factor with the ScrypTik web site is how we rank highly in search engines (particularly Google) for a range of key phrases. These search engine optimisation skills honed by Purple Oar Software in developing this site, are applied to all client sites. Note, we have never bought advertising or links for ScrypTik. We sell advertising using the Google Adsense program on the site, and Google pay us.

Web 2.0

Web 2.0

Web 2.0 is a relatively recent term, coined to describe the "second generation" of web sites. Although regarded as hype by some commentators, we agree with the general thrust of Web 2.0. Web sites are becoming more sophisticated, and to be competitive, a site needs to engage the visitor. This means a dynamic site with features such as polls, surveys, newsletters, and a discussion forum. It is also common now for the owner to maintain a "blog", a web log or diary.

Briefly, Web 2.0 means:

  • It is about "you", the user! You can generate content and participate in this "social media".
  • The Internet is no longer a web of documents, it is a web of data.
  • Internet users are not passive, they respond and communicate.
  • Sites should be web standards compliant (W3C - World Wide Web Consortium).

For example, Amazon allows their visitors to write book reviews, which they publish. These reviews may be highly critical, which you may think would hurt their sales. But Amazon is doing more business because they are seen as a more trustworthy company. Amazon has harnessed the book buying community to increase their business in an innovative way.

Content Management Systems

Manage your own content.

We use and recommend the free open source Content Management System (CMS) called Drupal. It is written in the PHP programming lanuage and uses the MySQL database. Drupal is more than a CMS, it is a framework where specific functionality may be added by including "modules". We will develop modules for special features you may require.

Usually, we configure this CMS, design the theme, set up search engine optimisation factors, set up content and images to suit you, test, upload, and train you in the use of this system. We would also add Privacy Policy, Terms of Use and Disclaimer pages if required. We will explain how you should solicit links for best search engine ranking. This will provide you with these benefits:

  • A web standards compliant site.
  • Content and images directly under your control for ease of updating at any time.
  • Ability to amend your site from anywhere there is Internet access.
  • Visitors can locate content by "search" and/or by placing content into categories.
  • A "breadcrumb" trail so your visitors can see where they are.
  • Ability to easily create sub-domains for other aspects of your site. Sub-domains have their own content and presentation and appear to search engines and visitors as completely separate sites. This is a significant feature for future diversity.
  • Site optimised for agreed key words/phrases for improved search ranking.
  • Visitors can email you without publicly exposing your email address, leaving your website or assuming there is a suitable email client (e.g. Outlook) on the computer being used.
  • To prevent malicious automated posting to public parts of your site, visitors posting can be asked to recognise and enter a few characters displayed over an image (captcha). If the entry does not match the characters displayed, the posting is rejected.
  • To prevent unseemly words appearing on your site from public postings, a word filter can be provided to censor any words you specify.
  • An updated Google sitemap can be generated whenever Google requests it.
  • Your site may be multi-lingual for international marketing.
  • Additional features such as blog, newsletter, poll, survey and forum etc can be easily provided when they are required.
Syndicate content