#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    77
    Rep Power
    15
    hi all,

    I have been thinking about this one and trying to find solutions all morning but as of yet have not come up with any. What I have at the moment is a text box that is populated with a press release that is brought in from my mysql table. that part is fine. I want to extend things however and have a 'bold', 'underline' button etc. so that when the user clicks on the button it drops the html code (eg. <b></b> ) into the textbox in the location of the cursor. I can get it to add the code at the start or end but not where the cursor is. Can anyone help me?? Thanks in advance.

    Dave
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    You'll have to do that client side with javascript. The position of the cursor or any highlighted content doesn't get passed on submission, so there is no way you could do it server side... unless you had them do some cut and paste into different text boxes... yuck!
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    77
    Rep Power
    15
    Rod,

    yer I have been playing around with some javascript but I can't work out how to get it to insert the tags in the middle - say rather than append them to the end or start or put the tags around the entire text. do you know how it can be done? thanks in advance.

    Dave

Similar Threads

  1. New MS-ie features w/ window.open?
    By don hoffman in forum HTML Programming
    Replies: 0
    Last Post: July 5th, 2003, 09:37 PM
  2. Adding features to my forum
    By Sonic98 in forum PHP Development
    Replies: 1
    Last Post: December 5th, 2002, 03:05 AM
  3. php search features VS asp
    By dreamstring in forum PHP Development
    Replies: 5
    Last Post: July 24th, 2002, 02:05 PM
  4. phpMyAdmin advanced features discussion
    By dwh in forum MySQL Help
    Replies: 9
    Last Post: May 7th, 2002, 12:16 AM
  5. remove all browser features of window.
    By benwhit in forum HTML Programming
    Replies: 3
    Last Post: May 14th, 2001, 04:10 PM

IMN logo majestic logo threadwatch logo seochat tools logo