javascript for SELECT and COPY

Discussion in 'JavaScript' started by gilgalbiblewheel, Mar 5, 2009.

  1. #1
    I tried the following to select/highlight and copy the textarea:
    <input style="float: left; background-color: #B5A26F; border-color: #98A9A9; 
    width: 150px; font-weight: bold; color: #FFFFFF;" type="button" value="Select All" 
    onClick="javascript:document.getElementById('forum_quote').focus(); 
    document.getElementById('forum_quote').select();" />
    Code (markup):
    I'm getting this error:

     
    gilgalbiblewheel, Mar 5, 2009 IP
  2. DGK

    DGK Peon

    Messages:
    73
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Is there HTML element with id=forum_quote
     
    DGK, Mar 5, 2009 IP