tips and tricks for movable type

combined form for bloglet and mt notifications
February 24, 2003

I'm no Javascript whiz by any stretch of the imagination. But when Doc aka medic119 asked about creating a combined form for Bloglet subscriptions and MT notifications over in the support forums, I turned to Google to see what I could come up with.

Javascript:

<script language="Javascript">
function bloglet(form)
{
document.myform.action="http://www.bloglet.com/subscribe.asp"
document.myform.submit()
}
function notify(form)
{
document.myform.action="<MTCGIPath>mt-add-notify.cgi"
document.myform.submit()
}
</script>

Form:

<form name="myform" method="post" action="<MTCGIPath>mt-add-notify.cgi">
<input type="hidden" name="blog_id" value="<MTBlogID>">
<input type="hidden" name="_redirect" value="<MTBlogURL>">
<input type="hidden" name="ID" value="XXXX">
email: <input class="forms" value="" name="email" size="20"
maxlength="100" /><br/><br/>
url: <input class="forms" value=""
name="url" size="23" /><br/>
(optional)<br/><br/>
<input class="buttons" type="submit" value=" bloglet " onClick="bloglet()"; />
<input class="buttons" type="submit" value=" notify " onClick="notify()"; />
</form>

Replace XXXX with your Bloglet ID number.

Now, I have no idea what happens if someone submits a URL when choosing the Bloglet option (I was too lazy to test it that day). And I'd rather have radio buttons with a single submit button. And, of course, if this is possible without Javascript, that would be nice too.

But I thought I'd throw this out there in case anyone a) wants to use it, or b) can improve upon it in the aforementioned ways.

Comments

This definitely more clever than the kludge I used (multiple forms) on my site's registration page... attempting to enable people to sign up for two separate bloglet notification lists AND a lyris list. Ack!

by Adam Lasnik | 03.22.03 07:15 PM

How could I simply have two buttons, one to subscribe to bloglet, and one to un-subscribe?

Also n00b question: Javascript goes in the header section, and form stuff goes in body section, right?

by Jamie Kenyon | 07.10.04 04:40 PM

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

TrackBack: 3
(URL: http://www.thegirliematters.com/sf/mt-track.cgi/141)

» The one that makes me scream, she said
Excerpt: A few site tips and tricks of note...some new, some not... Individual link "click tracker" script Oldie but a goodie...how to prevent your site from being Googled Combined form for MT and Bloglet subscriptions Kristine's wonderful MT Plugin Directory H...
Weblog: Ain't too proud to blog
Tracked: 03.06.03 11:47 AM

» MT and Bloglet RSS to Email Primer
Excerpt: Selling government agencies on RSS would be easier if we could demonstrate an easy way to convert their news to automatically generated RSS delivered email newsletters. In this first of a two-part series, we show you how easy it is to use Moveable Type...
Weblog: RSS in Government
Tracked: 05.01.03 06:48 PM

» Movable Type Enhancements
Excerpt: In trying to determine whether Movable Type (MT) was a feasible backend for OK/Cancel, I found a variety of sites and discovered just how big the MT community really was. If there's a function you can think of (and many...
Weblog: my:dentity
Tracked: 09.28.03 11:35 AM