I’ve been asked by several members about how I implemented my Ask box on my blog’s main page. So I guess this is finally the time I actually publish an answer instead of messaging people back.
The solution to this is pretty easy, and that solution [sadly] is iframes. My reason for using them is that all Ask pages on Tumblr currently use iframes anyway. You can either right-click, view source on your own Ask page and find and copy Tumblr’s iframe markup yourself or you can just copy and paste the following code, replacing YOURBLOG.TUMBLR.COM with your own blog’s URL:
<h2><a href="">Ask me anything</a></h2>
<p><iframe frameborder="0" scrolling="no" width="100%" height="149" src="http://www.tumblr.com/ask_form/YOURBLOG.TUMBLR.COM"
style="background-color:transparent; overflow:hidden;" id="ask_form"></iframe>
<!--[if IE]><script type="text/javascript">document.getElementById('ask_form').allowTransparency=true;</script><![endif]--></p>
Note that is by no means the ultimate solution to the above problem (using PHP to fetch the form would be a far greater option) but seeing how Tumblr’s Ask page makes use of iframes and how nearly all the people who ever ask me a question go straight to the Ask URL anyway, I don’t see using iframes for this as a major problem.
Hope this helps any other people who were interested in doing this with their own Ask box.
Oh, and if you have any other questions (be it personal or technical), feel free to ask away! :-)
