SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Jun 2006
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    text highlighting

    I want to highlight some text in a page (with a color selected from the color pane) and store it in database so that on next visit to the page the highlighted text appears again. Any idea how can I implement this.

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    73 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by neel1979 View Post
    I want to highlight some text in a page (with a color selected from the color pane) and store it in database so that on next visit to the page the highlighted text appears again. Any idea how can I implement this.
    "On next visit to the page". By whom? Same person, same session? Anyone? What happens when someone overwrites the hilighting?

  3. #3
    SitePoint Addict
    Join Date
    Jun 2006
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lets consider there is only a single visitor. Not in same session and that's why i want to store the highlighted text in database.
    1. user logs in
    2. highlight text which is stored in db
    3. user logs out
    4. same user logs in again and see the highlighted text that he did earlier.

  4. #4
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    73 Post(s)
    Tagged
    0 Thread(s)
    Personally, if i were going to do this, it'd be a Javascript heavy setup, perhaps periodic AJAX calls to store the data (drafting), a save button to hard-save, (also hardsave on Logout). There would be little PHP actually involved except to 1) Initial display data, and 2) the AJAX receiver, which would just take the text sent and store it.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.


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
  •