Problems testing rss feeds in Safari locally with test domain, due to redirects 2

Posted by Tim Connor Mon, 23 Apr 2007 19:03:00 GMT

Safari redirects feeds to its internal pretty handling with the feed: protocol. If you are working with a local test domain, such as http://test/yourfeed.rss you’ll have problems. In this case, Safari adds a www. and a .com, which is a problem, since you probably aren’t serving the same content up at http://www.test.com/yourfeed.rss. I am not sure if it’s always the case, but it additionally hard to track down in my case, because somehow when it choked Safari ended up redirecting to http://yourfeed.rss without any domain.

I have filed a bug with Apple, but until then I am adding a ServerAlias for the www.com version of my dev domains in Apache config, as a work-around. And for some reason adding www.test.com in the NetInfo Manager doesn’t work, so I added it to my /etc/hosts file.

Fix for Typo Scribbish theme v2 - aka disabling a submit button in IE 2

Posted by Tim Connor Thu, 26 Oct 2006 17:11:00 GMT

I looked into it a little more this morning, and came up with how to still get the submit button disabling, to avoid double-posts, without having to rework anything substantially.


<%= submit_tag 'Submit', :onclick => "$('commentform').onsubmit();this.disabled=true;Element.hide('preview');return false;"%>

You first call the form’s onsubmit, since IE won’t call it if you submit the form via JavaScript, then you prevent browsers that don’t cancel the form when you disable the submit button from double-submitting, by returning false at the end.

This should still work with javascript off, if you have the “Allow non-Ajax comments” setting turned on.