Results 1 to 2 of 2

Thread: Forum-like Javascript

  1. #1
    Join Date
    Mar 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Forum-like Javascript

    I found a javascript at this website: http://www.thecodebehind.com/code/ja...ld-italic.aspx.

    I tried it out in my page but something is missing and it didn't seem to do the trick. I really don't know that much about javascript (being a webdesigner and not a programmer) but I do know that one ends the script with </script>.
    Um... I'm not sure if I just input it wrong, but if anyone knows what's the matter or can come up with a better alternative, it will be greatly appreciated.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That script is written to insert bbCode proprietary forum editor tags into a textarea being used on a bbForum. It should output things that look like this (for bold text, for example):

    [B>text meant to be bold is here[/B>

    into the textarea that would be interpreted by the bbForum package (parsed by the server) to mean :

    text meant to be bold is here

    However, this will not work on an ordinary HTML page as virtually anything entered into a textarea in plain HTML gets shown literally (without any parsing on the browser's or the server's part). Even if you were to edit the script to output this to the textarea (actual HTML tags):

    <b>text meant to be bold is here</b>

    In ordinary html, in a textarea, this would appear literally, just as it does above. There are text formatting scripts meant for ordinary HTML. Here is one from DD. It doesn't work in all but does work in most browsers.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •