#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    7
    Rep Power
    0

    Javascript buttons - Document write


    We are trying to develop a simple interface for a cms for un skilled people to alter web page content. We have got the php code sorted out as far as the load page and write contents etc but i am trying to incorporate simple buttons as seen on pretty much all forum sites. I am very new to Javascript and i would like some help with the formatting of the text.

    The interface i would like to have is basically type the text in the box, user then selects the text and clicks the button for the required formatting, we have got the back end worked out to convert the simple code to HTML already. Its just the last bit we need some help on.

    Can someone please help or at least point me in the right direction of a imple tutorial to do this.
  2. #2
  3. No Profile Picture
    Super Moderator
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,008
    Rep Power
    2790
    I actually wrote a script to do exactly what it is you need. I'm at work now, but when I get home, I'll email it to you. Send me a message with your email.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    7
    Rep Power
    0
    more information on my problem.

    Exactly what i need to do is this....
    I have the text editor interface written in PHP and it all works fine, the last bit i need to be able to do is basically select some text and click a button to place tags around the text that are later replaced with actual HTML tags with PHP. All the buttons are created and loaded into the page.

    The problem is that when i click on the button (using the document.write or writein function) it simply rewrites the page.
    I just need to know how to keep the focus in the text area and just insert the tags when i click on a tool button.
    Please help
    Last edited by Digital High; July 16th, 2003 at 07:25 AM.

IMN logo majestic logo threadwatch logo seochat tools logo