Please help in JS

Results 1 to 2 of 2

Thread: Please help in JS

  1. #1
    moti Guest

    Default Please help in JS

    Dear Sirs ,<BR>Please i need a function in order to check if no html tags were inserted in my form so i dont get problems in my db<BR>Regards <BR>Tomi

  2. #2
    Tom Levesque Guest

    Default RE: Please help in JS

    Here&#039s a quick and dirty check:<BR><BR>function check_for_tags(my_string)<BR>{<BR><BR>var good = true;<BR><BR>if(my_string.indexOf("&#060;") &#062; -1)<BR>good = false;<BR>else if(my_string.indexOf("&#062;") &#062; -1)<BR>good = false;<BR><BR>if(!good) alert("Please , no HTML tags! Remove all &#060; and &#062; from your text.")<BR><BR>}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts