Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Form to a jsp page!

    Does anyone know whats wrong with this script?
    ----------------------------------------------------------------------


    <html>
    <head>
    <title>name to page script</title>
    <SCRIPT LANGUAGE="JavaScript"
    </head>
    <script language="JavaScript"><!--


    function doBoardSubmit() {
    with (document) {
    error="";
    if (board.name.value.length<3) {
    error+="Name is too short (must be at least 3 characters)\n";
    }

    if (error.length>0) {
    alert("Please correct the following:\n"+error)
    } else {
    return board.submit();
    }
    }
    }



    // --></script>
    <body onLoad="checkForCookie()">




    <form action="tournament2.jsp" enctype="x-www-form-urlencoded" method="POST" name="board">
    <b>Type name to appear under people</b>
    <table cellpadding=2>
    <tr>
    <input name="formsubmit" type="hidden" value="false">
    <td align=right>Name:</td>
    <td><input name="name" type="text" size="16" maxlength="16"></td>
    </tr>
    <td align=center colspan=2><a href="javascript:doBoardSubmit()">Enter&nbsp;</a></td>
    </table>
    </form>



    <table width="420">
    <tr><th>People</th></tr>

    <tr><td>nicknax11</td></tr>

    </table>

    </body>
    </html>

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    You enjoy posting from site to site...

    Where is it failing, we are not superheros...
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


  •  

    Posting Permissions

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