Results 1 to 4 of 4

Thread: Form field Limiter

  1. #1
    Join Date
    Feb 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Form field Limiter

    1) Script Title: Form field Limiter

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...limitinput.htm

    3) Describe problem: I am trying to use this script for 3 different text boxes within the same form. But after I add a second text box with the script they both stop working.

    I am naming each text box separtely and changing the names within the displaylimit code area but still it doesn't want to work.

    Am I missing something?

    Thanks,

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Did you put the:
    Code:
    <script type="text/javascript">
    displaylimit("","johndoe",10)
    </script>
    Under the third input?
    - Mike

  3. #3
    Join Date
    Feb 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Here is the code I have for all three text boxes.

    Code:
    <form id="form1" method="post" action="">
                        <table width="100%" cellspacing="0" cellpadding="0">
                          <tr>
                            <td height="20" valign="top"><div align="left" class="style3"><strong>Tell us about your business.</strong></div></td>
                            </tr>
                          <tr>
                            <td height="147" valign="top"><div align="left" class="style3">
                              <textarea name="Question1" id="Question1" cols=50 rows=7></textarea>
                              <br>
                              <script>displaylimit("","Question1",180)</script>
                            </div></td>
                            </tr>
                          <tr>
                            <td height="22" valign="top"><div align="left" class="style3"><strong>How did you get started selling online?</strong></div></td>
                            </tr>
                          <tr>
                            <td height="146" valign="top"><div align="left" class="style3">
                              <textarea name="Question2" id="Question2" cols=50 rows=7></textarea>
                              <br>
                              <script>displaylimit("","Question2",150)</script>
                            </div></td>
                            </tr>
                          
                          <tr>
                            <td height="24" valign="top"><div align="left" class="style3"><strong>What challenges do you face selling online?</strong></div></td>
                            </tr>
                          <tr>
                            <td height="148" valign="top"><div align="left" class="style3">
                              <textarea name="Question3" id="Question3" cols=50 rows=7></textarea>
                              <br>
                              <script>displaylimit("","Question3",120)</script>
                              </div></td>
                            </tr>
                          <tr>
                            <td valign="top"><div align="left" class="style3">
                              <input type="submit" name="button" id="button" value="Submit Interview" />
                            </div></td>
                          </tr>
                        </table>
                                  </form>

  4. #4
    Join Date
    Feb 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I searched and found a post on here that helped me fix it.

    I really just started from scatch and it seems to be working now.

    Here is my new code:

    Code:
    <form name="interview" action="save_issues.php" method="post">
      <p><strong>Tell us about your business.</strong> </p>
      <p>
        <textarea rows="6" cols="60" id="question1" name="acquestion1"> </textarea>
        <br>
        <script>
    displaylimit("document.interview.acquestion1","",2000)
        </script>
        <br>
      </p>
      <hr />
      <p><strong>How did you get started selling online?</strong></p>
      <p>
        <textarea rows="6" cols="60" id="question2" name="acquestion2"></textarea>
        <br />
        <script>
    displaylimit("document.interview.acquestion2","",2000)
        </script>
      </p>
      <hr />
    <p><strong>What challenges do you face selling online?</strong></p>
    <p>
      <textarea rows="6" cols="60" id="question3" name="acquestion3"></textarea>
      <br>
      <script>
    displaylimit("document.interview.acquestion3","",2000)
        </script>
      </center>
        <br>
        <input type="submit" value="Submit Interview">
    </p>
    </form>

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
  •