I need HTML help...

  1. #1
    Inert is offline Newbie

    I need HTML help...

    I was wondering if there was a html code for replacing text with other text. I can't use javascript btw. I have this problem that automatically includes a sentence with the words I type in.

    ex.
    HTML is bad for my health.

    So as Inert was saying... "HTML is bad for my health.".

    I was wondering if there was a html code i could use so it would replace the text part "So as Inert was saying...". If there is I'd appreciate the code, if not, then nothing will come of harm. HTML can't do everything.

    Though java script is pretty useful...


  2. #2
    D-A-L is online now D-A-L Administrator
    I'm not sure I follow ....can you explain a little more please...

  3. #3
    Inert is offline Newbie
    Well, say I have a field to put in a message. I can put anything I want in it. However, it always includes text infront of it that links my message to it. So instead of saying "I like pie", it says 'Inert says "I like pie"'.
    I am wondering if there is an HTML code that I could use so when I type what message I want, it just says "I like pie", without the 'Inert says'.

  4. #4
    achorste is offline Valued Member
    Is this on a chat room? If so what's running it?

  5. #5
    Inert is offline Newbie
    no it is like in a message board that died out a while ago.

  6. #6
    achorste is offline Valued Member
    Have you got an example site so we can work out what you mean????

  7. #7
    HippyWarlock is offline Elite Member
    We need to know what's powering the message board ie PHP.

    If it's PHP look at this:
    http://board.php-princess.net/index....=ST&f=10&t=263

  8. #8
    MartynG is offline Newbie
    Quote Originally Posted by Inert
    I was wondering if there was a html code for replacing text with other text. I can't use javascript btw. I have this problem that automatically includes a sentence with the words I type in.

    ex.
    HTML is bad for my health.

    So as Inert was saying... "HTML is bad for my health.".

    I was wondering if there was a html code i could use so it would replace the text part "So as Inert was saying...". If there is I'd appreciate the code, if not, then nothing will come of harm. HTML can't do everything.

    Though java script is pretty useful...
    Here is a snippet of VB which has many good string replace functions which provide security to .ASP pages. The following examples replace the carriage return and line feed combinations (Characters 13 and 10)

    Replace strName, vbCrLf, " "
    Replace strName, vbCr, " "
    Replace strName, vbLf, " "

    Lotsa forums use this style of procedure to remove swear words etc. from postings automatically. The following is for php which while not as developed in terms of string manipulation has the str_replace function:

    // Provides: You should eat pizza, beer, and ice cream every day

    $phrase = "You should eat fruits, vegetables, and fiber every day.";
    $healthy = array("fruits", "vegetables", "fiber");
    $yummy = array("pizza", "beer", "ice cream");

    $newphrase = str_replace($healthy, $yummy, $phrase);

    Ok the bottom line here is you cant do it with HTML alone

  9. #9
    Inert is offline Newbie
    Tackle the Web with $5.99 .COM's from Go Daddy!
    Ah ok, I was just wondering if there was a code to replace words like that swear word protector thing. But like you said I can't do this with html alone so no matter.

    Thanks.

+ Reply to Thread