Is there any logical purpose for this javascript beyond what I can evaluate?
<p>Here are the snippets from one of our pages.  It's my opinion that this is terribly complex, confusing, and flawed in it's design.  For one thing, it causes a message in IE that the page is trying to access the clipboard.  Is there something I'm missing?</p>

<p><strong>I guess my question is; Is it okay to think that this is complete overkill?  Do I have a right to be frustrated?  Or am I oblivious to some higher knowledge?</strong></p>

<pre><code>function NoEmailGiven(){

    var copyval

    document.frm1.NoEmail.focus();
    document.frm1.NoEmail.select();
    copyval=document.SCPACALL.NoEmail.createTextRange();
    copyval.execCommand('Copy');
    document.frm1.Email1.focus();
    document.frm1.Email1.select();
    document.execCommand('Paste');
    document.frm1.Email2.focus();
    document.frm1.Email2.select();
    document.execCommand('Paste');

}

response.write "&lt;INPUT TYPE=button name=NoEmail VALUE=""None"" Title=""Click if No Email Address"" ONCLICK=""NoEmailGiven""&gt;&lt;/td&gt;&lt;/tr&gt;"
</code></pre>

<ul>
<li>Here is what the page is supposed to do..  </li>
</ul>

<p>If the user clicks the button labeled "Click here if no email address" then auto populate Email1 &amp; Email2 with the literal string 'None'</p>

<ul>
<li>Here is the pseudocode as I have figured it out from the page usage of what it <strong>actually</strong> does.</li>
</ul>

<p>If the user clicks the button labeled "Click here if no email address" copy the value of this button which is "None" into the client's clipboard, then paste from the clipboard into Email1 &amp; Email2</p>

<ul>
<li><p><strong>Finally: What I would have written</strong> (Only to duplicate the process, not improve or change the form to the users)</p>

<p><code>function NoEmailGiven()
{
    Email1.value = "None";
    Email2.value = "None";
}</code></p></li>
</ul>
