form error

H

Hursh

Hi,

I am trying to some values in a hidden field in a form to another ASP
page using POST method.

The problem is that when I change the value of the hidden field using
javascript after the page has been displayed, on submit it does get
posted. However on checking up whether the value has been set for the
hidden field, i find that the value i want to pass has been set.

the code is as following

**************************************
function submitForm()
{
var assetList=self.frames.y1_.makeString();

// this shows that the value i want to set has been set
alert(self.document.forms.hwForm.assetIDList.Value)

self.document.forms.hwForm.submit();
}

<FORM NAME="hwForm" METHOD="POST" ACTION="inventory.asp">
<INPUT TYPE="hidden" NAME="assetList" VALUE="init"></INPUT><BR>
</FORM>
**************************************


in the inventory.asp i do the following

Dim i
For i=1 to Request.Form.Count
Response.Write "<BR>" & Request.Form.Key(i) & " = " &
Request.Form.Item(i)
Next


Here it does not set the value to the new one i have set thru some
other javascript function.

Can anyone point any mistake or workaround of this problem

tia
hursh
 
E

Evertjan.

Hursh wrote on 20 feb 2004 in microsoft.public.inetserver.asp.general:
function submitForm()
{
var assetList=self.frames.y1_.makeString();

// this shows that the value i want to set has been set
alert(self.document.forms.hwForm.assetIDList.Value)

self.document.forms.hwForm.submit();
}

<FORM NAME="hwForm" METHOD="POST" ACTION="inventory.asp">
<INPUT TYPE="hidden" NAME="assetList" VALUE="init"></INPUT><BR>
</FORM>

assetList or assetIDList, which ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,826
Members
47,371
Latest member
Brkaa

Latest Threads

Top