SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast DrkRealm's Avatar
    Join Date
    Feb 2002
    Location
    California, USA
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Button Event to copy Data

    How might I accomplish this? I'd like to generate an onclick event that copies specified text in a web-page. I'd like to be able to pinpoint the selected range, if possible. The purpose is to take the text and generate correspondence.. any ideas?

    Thanks Millions!

  2. #2
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    more details

    I'm afraid you need to give us more specifics.

    We need to know where the text is:
    is it inside a div, a text box... etc

    How do you mean "correspondance"?

    I take it you mean that it's text implemented and conrolled by the web client user, because otherwise YOU'RE outputting the text and you have whatever control you want over it!

    Example.. if you wanted to send the information in a
    text field to someone... with a button click.

    well then you COULD just send the form to a script...
    or you could use javascript to grab the text and do what you want with it.

    var de=document.getElementById;
    var text=de('textfield').value;

    now the JS variable "text" has the text inside the textfield, filled in by the user.

    you need to tell me what you are trying to achieve for me to help you!

    Thanks

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •