Javascript Problem - Please Help

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

    Javascript Problem - Please Help

    Thanks in advance for your help. I am trying to access a Hidden Field
    in Javascript.

    The hidden field code is

    <input type="hidden" name="delCode" value="<%=rs1(" Perk_ID")%>"

    It's getting populated, because if I change "hidden" to "text" it
    shows the value of the field.

    However, when I try to access the field in Javascript it shows up as
    undefined.

    In debugging, I made it as simple as possible:

    function go_there()
    {
    alert(document. form1.delCode.v alue);
    }

    and the alert box shows undefined

    (The form name IS form1)

    Any ideas?

    Thanks.
  • Shannon

    #2
    Re: Javascript Problem - Please Help

    On 1 Oct 2003 15:36:39 -0700, chadscc@hotmail .com (Chad) wrote:


    try document.forms. form1.delCode.v alue

    =)

    Shannon

    [color=blue]
    >Thanks in advance for your help. I am trying to access a Hidden Field
    >in Javascript.
    >
    >The hidden field code is
    >
    ><input type="hidden" name="delCode" value="<%=rs1(" Perk_ID")%>"
    >
    >It's getting populated, because if I change "hidden" to "text" it
    >shows the value of the field.
    >
    >However, when I try to access the field in Javascript it shows up as
    >undefined.
    >
    >In debugging, I made it as simple as possible:
    >
    >function go_there()
    >{
    > alert(document. form1.delCode.v alue);
    >}
    >
    >and the alert box shows undefined
    >
    >(The form name IS form1)
    >
    >Any ideas?
    >
    >Thanks.[/color]

    Comment

    • johkar

      #3
      Re: Javascript Problem - Please Help

      You need to post your code, but assuming you didn't incorrectly cut and
      paste your hidden form field, you are missing the ending >

      It should be:

      <input type="hidden" name="delCode" value="<%=rs1(" Perk_ID")%>">

      John


      "Chad" <chadscc@hotmai l.com> wrote in message
      news:87feb722.0 310011436.74bb1 c1d@posting.goo gle.com...[color=blue]
      > Thanks in advance for your help. I am trying to access a Hidden Field
      > in Javascript.
      >
      > The hidden field code is
      >
      > <input type="hidden" name="delCode" value="<%=rs1(" Perk_ID")%>"
      >
      > It's getting populated, because if I change "hidden" to "text" it
      > shows the value of the field.
      >
      > However, when I try to access the field in Javascript it shows up as
      > undefined.
      >
      > In debugging, I made it as simple as possible:
      >
      > function go_there()
      > {
      > alert(document. form1.delCode.v alue);
      > }
      >
      > and the alert box shows undefined
      >
      > (The form name IS form1)
      >
      > Any ideas?
      >
      > Thanks.[/color]


      Comment

      Working...