Managing multiple onLoad events with Prototype
This is an update to a previous article written way back in 2003 "Managing multiple onLoad events in JavaScript".
The article describes how to create an array of onload (window.onload) events in order to queue each event and enable the browser to perform onload sequentially. However this can all be forgotten in preference to the Prototype Javascript Framework and the useful Event Observe method.
Use Event.observe instead of using <body onload="return myFunction()"> or DOM Level-0 event property window.onload = myFunction;
- Continue reading
- Filed under:
- Scripting
- JavaScript
- Prototype
FormSIX - Form Simple Interface in XML
FormSIX stands for Form Simple Interface in XML. It comprises of an XML parser writen entirely in JavaScript.
The purpose of FormSIX is the extend the Common Gateway Interface (CGI) by using XML as a transport mechanism where Client - Server communication is achieved using XML.
- Filed under:
- Scripting
Get active with this UI toolkit
I hope im wrong but I'm starting to think that most client-side developers have given up on common widget libraries, the inherent problem is the fact that supporting all flavour of browsers becomes so difficult and error prone that most development stops within the first few months.
Is it really the case that increase in bandwidth will be the death of the thin-client application? or is common client-side application delivery just before its time?
Anyway whatever your conclusion there is a new widget library called Active UI. It is a cross-browser Web GUI toolkit. This opensource project currently comprises of the following widgets, grid, tree, tabs, menu. It is built using DHTML, Javascript DOM, CSS and XML and can be integrated with any CGI page generation systems such as JSP, ASP, PHP and anything else that will generate the script at the Standard-Output level.
See also
- Filed under:
- Scripting
Rasmus Lerdorf's PHP
The creator of PHP Rasmus Lerdorf once mentioned at the Euro Apache conference in 2000 that he created PHP simply to make his life easier when developing web applications were he worked. I'm sure he didn't envisage it would ever be quite as popular as it is today. His short article 'Do You PHP?' notes PHP's current usage, advice for architects and its future within the web development community.
He also mentions that it is all to easy to write messy code in Php :)
- Filed under:
- Scripting
PHP and Large Websites
Aaron Crane of gbdirect has written an article expressing his experiences of using PHP in large scale websites.
The article focuses on the well known fact that many php based sites are difficult to maintain due to the combined presentation with business logic. It also highlights the difficulty of using php in large group development projects and that the language that was created for its simplicity is offten more complex than most when using it to create large websites.
- Filed under:
- Scripting
Reduce your Spam
Ive recently noticed that many websites have what looks like JavaScript gobbledegook at the base of their pages. On further investigation Ive come to discover that this is in fact a JavaScript function that encodes / obfuscates your html source.
This encoding is useful by helping to prevent nasty email harvesting robots from plucking out your email address from your websites mailto tag. (Which it would otherwise use for spamming purposes).
You could write your own encoder or use an online encoder; a popular encoder can be found at hiveware.com just type in your address hit the button and it will return you a piece of javascript that you can then cut n paste into your web page.
Other links:-
- Filed under:
- Scripting
- spam
Regular Expressions
Here's a site I wish I would have found a while ago when I needed an expression for UK post codes. Its got a whole host of expressions ready to cut n paste :)
- Filed under:
- Misc
Remote Scripting
Today web sites are trying to become more and more like traditional applications, however the call-response-reload model used in HTTP transactions makes this concept difficult and clumbersome to implement.
Applets (browser plug-ins) were created to allow the developer to build these more complex client-side applications, allowing connections directly to the server, for example in the infamous 'chat' applet. However these applets are seen to be rather 'heavy-weight' and more often than not look drab on website.
In modern browsers we can use DHTML to create dynamic content from the server without having to reload a page.
This 'remote scripting' concept is introduced on the Apple developer website.
- Remote Scripting with IFRAME - Apple
- Remote Scripting with IFRAME - O Reilly
- DotVoid - Remote Scripting with javascript
- DHTMLCentral - Remote Scripting with javascript
- Remote Scripting Resources
- Filed under:
- Scripting
Managing multiple onLoad events in JavaScript
It is possible to add multiple function calls within the standard onload event within the body tag, however there comes a time when we may want to use the window.onload call within our webpages. This will clash with our onload calls already defined within the body tag.
This article written by Robert Dominy, demonstrates the use of a separate script that adds each function to an array which will subsequently execute each onload function in turn. Without it we have no way to guarantee that all our required functions are called.
- Continue reading
- Filed under:
- Scripting
- JavaScript
Using Exception handling in JavaScript 1.5
JavaScript 1.5 (ECMA-262, revision 3) has a host of new functions including error handling this gives developers the ability to make their code more robust when coping with a wide range of unexpected events that could occur.
The try...catch...finally statement lets you safely respond to all types of exceptions. Errors are a type of exception thrown by the JavaScript interpreter when an anomaly such as an out-of-bounds array index, type mismatch, or syntax error occurs. The ECMAScript standard defines six types of errors. In addition, JavaScript 1.5 provides you with the capability to create and throw your own exceptions with the Error object and throw statement.
Read more at WebBuilder.com
- Continue reading
- Filed under:
- Scripting
Java to Javascript Communication
In this article we look at Netscape's LiveConnect which is used to allow JavaScript to Java and Java to JavaScript communication.
However in the light of Mozilla 1.0 it is also important to look at replacement technologies such as XPConnect.
Two other related articles from IBM and Sun are also worth a view, Revisiting Java technology on the client and How Java TO JavaScript
communication works in Java 'Plug-In'.
- Filed under: