By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,453 Members | 937 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,453 IT Pros & Developers. It's quick & easy.

Javascript Problem - Please Help

P: n/a
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.value);
}

and the alert box shows undefined

(The form name IS form1)

Any ideas?

Thanks.
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 1 Oct 2003 15:36:39 -0700, ch*****@hotmail.com (Chad) wrote:
try document.forms.form1.delCode.value

=)

Shannon

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.value);
}

and the alert box shows undefined

(The form name IS form1)

Any ideas?

Thanks.


Jul 20 '05 #2

P: n/a
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" <ch*****@hotmail.com> wrote in message
news:87**************************@posting.google.c om...
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.value);
}

and the alert box shows undefined

(The form name IS form1)

Any ideas?

Thanks.

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.