'Change email' form on custom page I would basically like to display the form/field that is used for changing the user's email address on a custom page with my own layout and things.

Ideally, I would like to make it so that if Javascript is enabled, the email address would appear as text with a 'Change' link next to it. The link would make a text box appear in place of text so that the user can change the address. Obviously, all this would happen without refreshing the page, and if Javascript is not enabled the email address should appear in the text box immediately like normal. If anybody can provide me with at least some, or all of the code that I need, that'd be so awesome.

Thanks in advance
If you've enabled the PHP Input Filter, you could add the following into your node/page. The javascipt won't execute if disabled, leaving only the input field :) 

&lt;?php
    drupal_add_js('misc/jquery.js', 'core', 'header');
?&gt;

&lt;script type="text/javascript"&gt;
(function($){
    $(document).ready(function(){
        var email = $('input#edit-email');
        if (!email.hasClass('error')) {
            var change = email.val() +' &lt;a href="#"&gt;Change&lt;/a&gt; ';
            $('input#edit-email').hide().after('&lt;div id="edit-email-container"&gt;' + change +'&lt;/div&gt;');

            $('div#edit-email-container a').bind('click', function(e, t){
                $(this).parent().hide().parent().find('input').show();
                e.preventDefault();
                return false;
            });
        }
    });
})(jQuery);
&lt;/script&gt;

&lt;?php
function userEmail_form() {
    global $user;

    $form['email'] = array(
        '#type' =&gt; 'textfield',
        '#default_value' =&gt; $user-&gt;mail
    );

    $form['submit'] = array(
        '#type' =&gt; 'submit',
        '#value' =&gt; 'Submit'
    );

    return $form;
}

function userEmail_form_validate(&amp;$form, $form_state) {
    if (!valid_email_address($form_state['values']['email'])) form_set_error('email', 'Invalid Email Address');
}

function userEmail_form_submit(&amp;$form, $form_state) {
    global $user;
    db_query('UPDATE {users} SET `mail` = "%s" WHERE `uid` = %d', $form_state['values']['email'], $user-&gt;uid);
    drupal_set_message('Email updated');
}

echo drupal_get_form('userEmail_form');
?&gt;