here snippets 1 of our pages. it's opinion terribly complex, confusing, , flawed in it's design. 1 thing, causes message in ie page trying access clipboard. there i'm missing?
i guess question is; okay think complete overkill? have right frustrated? or oblivious higher knowledge?
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 "<input type=button name=noemail value=""none"" title=""click if no email address"" onclick=""noemailgiven""></td></tr>"
- here page supposed do..
if user clicks button labeled "click here if no email address" auto populate email1 & email2 literal string 'none'
- here pseudocode have figured out page usage of actually does.
if user clicks button labeled "click here if no email address" copy value of button "none" client's clipboard, paste clipboard email1 & email2
finally: have written (only duplicate process, not improve or change form users)
function noemailgiven() { email1.value = "none"; email2.value = "none"; }
yes, stupid way this. didn't know doing , have not realised copy , paste user orientated concept, whereas copying value of 1 field using code more sense.
i'd delete , rewrite it!
Comments
Post a Comment