Blogs

Explore Dojo with Dojo Campus Feature Explorer

Dojo Campus has an interesting application called the Dojo Campus Feature Explorer. The application allows you to see examples of various features of the Dojo library and the HTML for each example. The application has an incredible amount of information.

You can go to the Dojo Campus Feature Explorere here.

I recommend this application to anybody that is wanting to learn more about using Dojo.

A Better Ajax Back Button - Part2

After a post that I wrote a few months ago on A Better Ajax Back Button, I received many comments. Many of the comments have asked for more information on the post and a working example.

In my previous post the code I used was done using JavaScript prototype objects. Because for some this is a bit more difficult to read I made this example as simple as possible to make it a bit easier to understand.

The below is the JavaScript portion of the code that is needed to accomplish the back button solution.

		function CheckForHash(){
			if(document.location.hash){
				var HashLocationName = document.location.hash;
				HashLocationName = HashLocationName.replace("#","");
				document.getElementById(HashLocationName).style.display='block';
				document.getElementById('Intructions').style.display='none';
				for(var a=0; a<5; a++){
					if(HashLocationName != ('Show' +(a+1))){
						document.getElementById('Show'+(a+1)).style.display='none';
					}
				}
			}else{
				document.getElementById('Intructions').style.display='block';
				for(var a=0; a<5; a++){
					document.getElementById('Show'+(a+1)).style.display='none';
				}
			}
		}
		function RenameAnchor(anchorid, anchorname){
			document.getElementById(anchorid).name = anchorname; //this renames the anchor
		}
		function RedirectLocation(anchorid, anchorname, HashName){
			RenameAnchor(anchorid, anchorname);
			document.location = HashName;
		}
		var HashCheckInterval = setInterval("CheckForHash()", 500);
		window.onload = CheckForHash;

In the above code you will notice that the function RedirectLocation calls the RenameAnchor function then sets the value of the hash (if you read the original article I go into more detail about what an anchor and hash are) in the URL. It is important that the RenameAnchor function is called before setting the hash value as it is important that an anchor with the same value as the hash exists before changing the value in order for the back button trick to work. The next important thing is that an interval is set to call the CheckForHash function (this interval could be whatever you want, but the smaller the number the more responsive the back button will be to the user) which checks the hash value and depending on the value will display a div (in your application you could have the function different, but I just wanted to keep it simple by showing and hiding div's).

Below is the HTML portion of the code.

	<a id='LocationAnchor' name=''></a>
	<div id='linkholder'>
		<a href='javascript:RedirectLocation("LocationAnchor", "Show1", "#Show1");'>Display Option 1</a><br />
		<a href='javascript:RedirectLocation("LocationAnchor", "Show2", "#Show2");'>Display Option 2</a><br />
		<a href='javascript:RedirectLocation("LocationAnchor", "Show3", "#Show3");'>Display Option 3</a><br />
		<a href='javascript:RedirectLocation("LocationAnchor", "Show4", "#Show4");'>Display Option 4</a><br />
		<a href='javascript:RedirectLocation("LocationAnchor", "Show5", "#Show5");'>Display Option 5</a>
	</div>
	<div id='Show1' style='display:none;'>
		1st Option
	</div>
	<div id='Show2' style='display:none;'>
		2nd Option
	</div>
	<div id='Show3' style='display:none;'>
		3rd Option
	</div>
	<div id='Show4' style='display:none;'>
		4th Option
	</div>
	<div id='Show5' style='display:none;'>
		5th Option
	</div>
	<div id='Intructions' style='display:block;'>
		Click on the above links to see different values, then use the back button to see your browsing history.
	</div>

In the above code there is an anchor tag that will be renamed in the JavaScript to trick the browser into thinking that the anchor exists. We then have all of the links set to call the RedirectLocation function in order to make sure that the hash and anchor values are set correctly. Finally there are a series of div tags that hold various content and will be displayed or hidden.

That is pretty much all there is to the example. You can view the sample here. Or you can download the code here.

I have tested the script without any issues on Firefox 2.0.0.13 and on Internet Explorer 7. It should work on Opera, Safari and earlier version of Internet Explorer and Firefox, but I have not had a chance to test on these browsers.

In my testing the code works with the back button, forward button and the refresh button. Plus pages where bookmarked correctly.

If you find a good use for this code I would love to hear about it (you can leave it in the comments or write a blog about it with your free Ajaxonomy account).

33 Most Beautiful JavaScript and Flash Galleries

v!valogo has put together a great list of JavaScript and Flash Gallery scripts. The list includes 33 scripts and is quite an impressive list.

Below is just a small sample of the Galleries.

AJAX Image Gallery powered by Slideflow

Lightweight Image Gallery with ThumbnailsDemo

Live Pipe PhotoFolderDemo

JaSDemo

JaS is a highly customizable JavaScript library for easily turning your images into a collection viewable as a slideshow, and with fading effects, if desired. It also supports automatic thumbnail creation and tagging of images, so the viewers can find the exact images they're looking for. You can use it any way you like in your own web site, and adapt it to your specific needs.

MooFlow

MooFlow is a Javascript based Gallery looks like Apple's iTunes or Finders CoverFlow.

You can see all 33 JavaScript and Flash Galleries here.

If you are looking for a cool way to display images on your site or application I definitely recommend checking out this list.

hi5 Launches Developer Platform

Tagged:  

The social network hi5 has just launched their developer platform. hi5 is an extremely popular social network (the network is number 8 according to Alexa) and like MySpace or Facebook is a desirable social network to develop applications for.

Below is an excerpt from the release plan of the developer platform.

Monday, March 31st 04:30 PST - Release has progressed as planned, and we now have 53 applications approved for launch tomorrow. If you got us your userids before about midnight, you can access the platform on www.hi5.com now. Currently the platform is open only to whitelisted users. Release to the rest of our users will proceed as planned starting at 12:00 pm PST today. If you were late getting your application submitted or getting your ids whitelisted, not to worry, contact us at platform-help@hi5.com and we'll do our best to accommodate you as soon as possible.

The hi5 Platform is set to launch tomorrow. Details of the rollout plan are as follows.

We will rollout to percentages of our user base based on userid ranges. In addition to that we have implemented a user whitelist to allow developers with apps that are launching and hi5 developers to see the platform regardless of rollout percentage. If you are a developer with an app launching and have not yet sent us ids to whitelist for the launch please send your developers' hi5 ids to platform-help@hi5.com and we'll add them to the whitelist.

You can read the full release plan here.

If you are interested in developing an application for the hi5 developer platform you'll be glad to know that they are supporting the open social initiative. If you make a cool app for hi5 I would love to hear about it (you can leave it in the comments or write a blog about it on this blog using your free Ajaxonomy account).

Adobe Flash Player Update May Affect Platform Applications

Tagged:  

If you are a developer of Facebook applications your applications may be affected by the new security patch release for Flash 9. The patch will be distributed this April (so, it will be released very soon and no this isn't an early "April Fools" joke).

Below is an excerpt from the announcement by Facebook.

If any of the following situations apply to your application, then your application could be affected by the update.

  • You use sockets or XMLSockets, regardless of the domain to which you are connecting
  • You use addRequestHeader or URLRequest.requestHeaders in any network API call when sending or loading data cross-domain
  • You provide access to content on remote domains as a web service provider
  • You have SWFs that are exported for Flash Player 7 (SWF7) or earlier that communicate with the hosting HTML by any means

You can read the full post here. Also, you can read the Adobe post here.

If you develop Facebook applications or if you are a Flash developer then you will want to look into how this may affect your applications.

Silicon Valley Google Technology User Group to host maps meeting

Tagged:  

If you are interested in making a cool Google Maps mash-up the Silicon Valley Google Technology User Group will be hosting a maps meeting. Michael Geary will be the primary speaker at the session. Michael created the Primary Election Results Map application and is very knowledgeable about making a Google Maps mash-up.

The event is April 2nd (so this coming Wednesday) and starts at 5:30pm with Michael speaking at 6:30pm. The event will be held at the Googleplex.

You can register for the event here and you can read more about the event here.

Google Maps adds More Street Views

Tagged:  

A few additions where made to the Google Maps Street Views. They have added quite a few metropolitan areas and a national park. The national park is what really interested me as it is quite fun to play with.

Below is the list of the new locations.

  • Albuquerque, NM
  • Anchorage, AK
  • Austin, TX
  • Cleveland, OH
  • Fairbanks, AK
  • Little Rock, AR
  • Madison, WI
  • Nashville, TN
  • Rockford, IL
  • Richmond, VA
  • Spokane, WA
  • St. Petersburg, FL
  • Tampa, FL
  • Yosemite National Park, CA

Taking a look at the famous El Capitan in Yosemite National Park can inspire (or intimidate!) you as you prepare for a hike:

View Larger Map

You can read more about the new additions here.

Google has also added the street view to the API, so now your maps mash-ups can include the street view feature. You can read more about the additions to the API here.

The street view is a great feature of Google Maps and it is great to see them continue to add new locations.

Google Makes Robot.txt Generation Easier

Tagged:  

If you have worked on a website that you want to control what search engine bots do you probably know just how powerful the robot.txt file can be. Configuring the robot.txt is often a specialty skill as many web masters don't do much with the file. Well, Google has made it much easier to generate a robot.txt file with a Robot.txt Generator tool that is part of it's Webmaster Tools.

Below is an excerpt from the Google Webmaster Central post.

Once you're finished with the generator, feel free to test the effects of your new robots.txt file with our robots.txt analysis tool. When you're done, just save the generated file to the top level (root) directory of your site, and you're good to go. There are a couple of important things to keep in mind about robots.txt files:

* Not every search engine will support every extension to robots.txt files

The Robots.txt Generator creates files that Googlebot will understand, and most other major robots will understand them too. But it's possible that some robots won't understand all of the robots.txt features that the generator uses.

* Robots.txt is simply a request

Although it's highly unlikely from a major search engine, there are some unscrupulous robots that may ignore the contents of robots.txt and crawl blocked areas anyway. If you have sensitive content that you need to protect completely, you should put it behind password protection rather than relying on robots.txt.

You can read the full post here.
To go to the Webmaster Center click here.

Now you can use the Robot.txt Generator to make your site work better on Google and possibly enhance your search engine effectiveness. There are other similar tools available, but a tool from the makers of the most used search engine on the planet is definitely worth a look. If you use the tool I would love to hear your experience with it.

markitup

markitup is an interesting script that allows you to change a textarea html element and turn it into a markup editor. You can use it to edit Html, Textile, Wiki Syntax, Markdown, BBcode or even your own Markup system.

The script is built on the jQuery library and does a good job of using the library. In case you are unfamiliar with the library you can learn more about it here.

You can see quite a few examples of markitup here. Also, you can read the documentation for the script here. Click here to go to the markitup web page where you can download the script.

This script would be very useful if you are creating a CMS, Forum or any system where your users would need to edit markup.

Aptana Jaxer 0.9.5


Via Kevin Hakman at the Aptana Blog, Jaxer 0.9.5 is now available with more horsepower and extra bells and whistles.

Download the latest version here

Expect performance gains to due Jaxer's core now being based on Firefox 3 and because Jaxer now pre-parses scripts to bytecode. Bells and whistles include more natural window/document objects on the server side, no more inlined external scripts, and a new autoload feature that caches scripts so they don't have be loaded on demand.

Read more about this release in Kevin's post at Aptana

Syndicate content