hidden field and validation (JSP)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • uNConVeNtiOnAL

    #1

    hidden field and validation (JSP)

    I am trying to do validation on a hidden field, but it doesn't seem to
    be working -
    all the other non-hidden fields do

    Is this indeed not possible? I am using a JSP tag for the hidden field

    } else if (form.primaryCo ntactPIN.value= ="") {
    alert('You must specify a Primary Contact');

    <html:hidden name="ideaForm" property="prima ryContactPIN" />

  • kaeli

    #2
    Re: hidden field and validation (JSP)

    In article <3F7AD5E5.1AC3D 994@visi.com>, tomcat@visi.com enlightened us
    with...[color=blue]
    > I am trying to do validation on a hidden field, but it doesn't seem to
    > be working -
    > all the other non-hidden fields do
    >
    > Is this indeed not possible? I am using a JSP tag for the hidden field
    >
    > } else if (form.primaryCo ntactPIN.value= ="") {
    > alert('You must specify a Primary Contact');
    >
    > <html:hidden name="ideaForm" property="prima ryContactPIN" />
    >
    >[/color]

    Sure, but why?
    Hidden fields almost never change, unless you as the programmer change
    them.

    Take a look at your html source (view source in browser) and make sure
    that the hidden field is indeed in the form between the form tags.

    Oh, and calling a variable "form" is bad practice. Use something the
    browser doesn't use, like "frm".


    -------------------------------------------------
    ~kaeli~
    All I ask for is the chance to prove that money
    cannot make me happy.


    -------------------------------------------------

    Comment

    Working...