Persistent URL Tools

Posted by Michael Giarlo on January 17, 2007

I’ve posted a couple new tools during the past couple days. One is an update of Devon Smith’s LinkPURL extension for Firefox 2.0.

The other is an ultra-lightweight Wordpress plugin that embeds a linkpurl link tag for auto-discovery (so bookmarking agents can detect and grab the persistent URL rather than the impersistent URL up in the addressbar).

Based on a discussion in #code4lib earlier today, I realize that there are a lot of important questions, not to mention serious doubts, about persistent identifiers. I flip-flop on their utility myself, so I found the discussion very useful. (Thanks, edsu!) Maybe I’ll write a post or two about persistent identifiers to flesh my thoughts out.

WSF - good for metascripting?

Posted by Michael Giarlo on December 05, 2005

The Windows Script File, .wsf, allows one to mark-up in XML different blocks of scripting. One can, in effect, write a script hooking VBScript, JavaScript, and PerlScript together. This looks to be quite powerful for scripters, especially within the domain of systems administration. Often one knows one scripting language better than another, and even more commonly one may exploit the strengths of multiple languages. Imagine combining the ease of Windows operability in VB with the regular expression power of PerlScript with… whatever it is that JavaScript does well. Could be quite a nifty tool.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsAdvantagesOfWs.asp

Google Maps JavaScript problem in IE

Posted by Michael Giarlo on December 02, 2005

Internet Explorer likes to throw the “Operation Aborted” error when trying to hook into the Google Maps API via JavaScript, at least when the JavaScript is placed where it is supposed to, i.e., a reference to the Google Maps JavaScript in the page HEAD and the actual rendering of the map within the DIV tag.

To fix this in IE, move the DIV block JavaScript code near the bottom of your HTML. Place it right between the terminating BODY tag and the terminating HTML tag. The problem seems to be that IE gets all confused when JavaScript attempts to make modifications to the page — e.g., sucking down a map from Google — while still rendering the body HTML. There are a couple other fix options here:

http://www.mapki.com/index.php?title=FAQs#Browser_Problems

It is worth noting that this “fix” does not break functionality in Firefox. And, really, who cares about the other browsers? Communists and robots, my friend.

In the HEAD of your page, you may include the initial JavaScript

<script src="http://maps.google.com/maps?file=api&v=1&key=BLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAH" mce_src="http://maps.google.com/maps?file=api&v=1&key=BLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAH" type="text/javascript"></script> 

Though it surprised me that I couldn’t remove the terminating SCRIPT tag and instead make the first SCRIPT tag self-terminating, i.e., instead of <script foo="bar"></script>, I tried <script foo="bar"/> and it didn’t work.

The JavaScript that actually renders the map within the DIV tag, cleverly named “map”, should look similar to the following:


</BODY>
<script type="text/javascript">
//<![CDATA[ 

var map = new GMap(document.getElementById("map"));
map.setMapType(G_HYBRID_TYPE);
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.centerAndZoom(new GPoint(-666.666,66.6666), 2);
map.openInfoWindowHtml(map.getCenterLatLng(), "100 Main St.<BR>Nowheresville, ZZ 99999
ZZZ");

//]]>
</script>
</HTML>