How to send highlighted word to server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Niloufar
    New Member
    • Oct 2010
    • 1

    #1

    How to send highlighted word to server

    How can I write a piece of code in Ajax which when the user highlights a word on his browser that word is sent to server?
  • RamananKalirajan
    Contributor
    • Mar 2008
    • 608

    #2
    highlight means? Are you saying about the selected text?

    Thanks and Regards
    Ramanan Kalirajan

    Comment

    • Niloufar eee

      #3
      Y

      Yes the user selects a word by highlighting it on the webpage, I want that highlighted word to be sent to server

      Comment

      • RamananKalirajan
        Contributor
        • Mar 2008
        • 608

        #4
        This link will be helpful for you.

        Thanks and Regards
        Ramanan Kalirajan

        Comment

        • rnd me
          Recognized Expert Contributor
          • Jun 2007
          • 427

          #5
          Code:
          var i=new Image;
          i.src="cgi.php?sel=" + escape(document.getSelection());

          Comment

          Working...