Latest Web News

People shortage gets CIO attention
Australian CIOs are fussing less over technical problems and more over locking down scarce staff and getting systems to back up business operations. Their views...

Aerial photos put the focus on Sydney
Google Maps has been updated with the high resolution images taken over Sydney on Australia Day. The new photos, captured by a specially-equipped chartered twin-engine Aero Commander which flew over parts of...

Symantec prepares Norton 360 for Australia
Symantec is preparing to launch an online security and backup service in Australia next month, which will directly compete with Microsoft’s OneCare Live. Norton 360...

Telstra to fund IT student scholarships
Telstra's chief executive Sol Trujillo says Australia needs to develop more highly skilled IT workers. Telstra has announced it will spend $1.35 million to fund scholarships for 15 IT students to take part in postgraduate...

Aussie bands to Hoe-Down in Second Life
Australian bands will perform in a virtual concert being staged in the 3-D online world Second Life. The Hoe-Down Under Texas Aussie Music Party, which coincides with the South by Southwest Music conference and festival...


03.01.07


Spry - Checking For A Valid URL

By Raymond Camden

There has been a UDF released for a while now that would check to see if a URL is valid. Ben wrote urlExists over a year ago.

Along with isValid(), you can check both the form and existence of a URL.

For the heck of it - I thought I'd make a quick demo in Spry showing how you can do without refreshing the browser. First take a quick look at the online demo:

http://ray.camdenfamily.com/demos/spryurlcheck/

Don't hit submit on the button, just enter a URL and click off of it. Note that the you have to enter a valid URL before the server will check it. (So don't enter "toaster", enter "http://www.toaster.com".)

The code behind this is rather simple. First, look at the form field for URL:



I use an onBlur to call a JavaScript function. Also note the span next to the form field. validateURL is pretty simple:



Try a Better Way Today.
Try WebEx MeetMeNow -
Click Here

I grab the value of the URL and ensure it isn't blank. Next I use updateContent. This was added in the last Spry release. It is a simple way to load a new URL into a div or span. Here I'm simply pointing the span next to my form field to a server side file. The server side file is also rather simple. To cut down on the size I removed Ben's UDF:



The only thing that I don't like about this demo is the speed. Adobe made updateContent blocking, so you can't do anything while the page is loading. Of course, someone could easily add this to the Spry code.

Comments

About the Author:
Raymond Camden, ray@camdenfamily.com
http://ray.camdenfamily.com

Raymond Camden is Vice President of Technology for roundpeg, Inc. A long time ColdFusion user, Raymond has worked on numerous ColdFusion books and is the creator of many of the most popular ColdFusion community web sites. He is an Adobe Community Expert, user group manager, and the proud father of three little bundles of joy.

About DevWebProAU
DevWebProAU is for professional developers ... those who build and manage applications and sophisticated websites. DevWebProAU delivers via news and expert advice New Strategies In Development.

DevWebProAU is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com NetworkNewz.com



-- DevWebProAU is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2007 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal  

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article


Delivering IT Solutions DevWebProAU News Archives About Us Feedback DevWebProAU Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact