FCKEditor Help

Discussion in 'JavaScript' started by maxclif, Aug 27, 2008.

  1. #1
    I use Fckeditor to enter text in one of my site forms. All I want is that the user should atleast enter 100 characters or else a popup should come up.
    Can anyone help me with this :)
     
    maxclif, Aug 27, 2008 IP
  2. Supah Fly

    Supah Fly Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <form name="name-of-form" method="get" action="http://www.yourdomain.com" onsubmit="showpopup()">
    <input type="text" name="textbox-name">
    <input type="submit" value="Submit form">
    </form>
    Code (markup):
    function showpopup() {
      if (name-of-form.textbox-name.value.length < 100) {
        alert('You entered less then 100 characters!!!');
        return('false');
      }
      else {
        return('true');
      }
    }
    Code (markup):
     
    Supah Fly, Aug 29, 2008 IP
  3. maxclif

    maxclif Well-Known Member

    Messages:
    187
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #3
    Its a late reply but thank you :)
     
    maxclif, Nov 29, 2008 IP