IIS - Value just contiues (commaseparated?)

Asked By jodleren
13-Nov-09 02:59 PM
Hi all

In a form, I have some hidden values, which once set stays forever.
There is an ignore option, and I keep it, as it might be needed later.
If is default false (<>"true"), that works well.
Just before </from> I set the value.
In 2 places, there is a small script, which can set the value to true.
But the problem is, that it just "grows", second time it is not

Why?

WBR
Sonnich

Code:

response.write request("ignore_mf") & "<br>"
bIgnoreMissing=safe_str(request.form("ignore_mf")) = "true"
request.form("ignore_mf")=""  ' does not help
request.form("ZipError")=""
response.write "bIgnoreMissing= " & cstr(bIgnoreMissing)  & "<br>"

.....
if bIgnoreMissing then
%><%
else
%><%
end if
ZipError
(1)
Sonnich
(1)
Response.write
(1)
Emailaddress
(1)
Otherways
(1)
Validator
(1)
Contiues
(1)
Surfaces
(1)
  jodleren replied to jodleren
13-Nov-09 02:59 PM
And this does not set it?

class=3D"button2"
onClick=3D"document.forms[0].elements
['ignore_mf'].value=3D'true';">

It is java, so it does not belong here. But I guess the problem is
related to my commaseparated text?

WBR
Sonnich
  Evertjan. replied to jodleren
13-Nov-09 05:31 PM
jodleren wrote on 13 nov 2009 in microsoft.public.inetserver.asp.general:




Why not the far more readable:

if safe_str(request.form("ignore_mf")) = "true" then
bIgnoreMissing = "true"
else
bIgnoreMissing = "false"
end if
%>



--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
  jodleren replied to Evertjan.
16-Nov-09 11:09 AM
%>'>

Well, that did not explain my problem :)
  Evertjan. replied to jodleren
16-Nov-09 07:59 AM
jodleren wrote on 16 nov 2009 in
microsoft.public.inetserver.asp.general:


It was not ment to do.

Which shows that a usenet NG is not a paid helpdask.

However I urge you to pay[ ;-) ] attention,
as readable programming surfaces otherways obscure errors.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
  Dan replied to jodleren
16-Nov-09 11:47 AM
Can you post the code without snipping? I am guessing that the cause of the
problem has been snipped out.

If you keep getting values appended like that, then it is normally caused by
having 2 fields of the same name, each with one of the values. So, for
instance, you have the code above which writes out a hidden field called
ignore_mf and sets it to either true or false, which is fine. But if you
have another hidden field called ignore_mf in the same form, which just has
the value from request.form written into it (maybe you have this for
debugging or testing), then the browser will send both hidden fields, and
the result is the values appended to each other with a comma between them
(because that is how ASP stuffs multiple fields with the same name into a
single value).

I'd suggest you view the source of your form, and look for any duplicated
ignore_mf fields. If you have multiple forms on one page, make sure you have
closed each correctly. Maybe you have more than one form, each has an
ignore_mf field, and because you have omitted a </form> tag they are being
treated as one form (or you have made a HTML error that causes the </form> to
be ignored because it is in the wrong place - use a HTML validator to check
for this).

--
Dan
Create New Account
help
my code runs in IE and not in firefox. the code goes like this: * ** ** ** ** **ASP* ** ** ** ** ** ** ** * Response.Write "<form name = ""form1"" method = ""get"" target = ""_blank""> " Response.Write " <tr> " Response.Write " <td > " Response.Write " <table width = ""100%"" border = ""0"" cellpadding = ""0"" cellspacing = ""0""> " Response.Write " <tr> " Response.Write " <td
record to database, after the record has been added. I want to prompt a message Response.Write("") Response.Write("alert (""Hello"");") response.write("") It just goto Response.redirect "OS_addnew.asp" The following is my complete code: if strshipper strcompleted_date &", " & strcompleted_time &", "& stravailable_pu_date &", " & stravailable_pu_time &", "& strPOD_date &", " & strPOD_time &", '" & strreceiving_wh &"', '" & strevent_report &"', '" & strinbound_no &"', '" & stroutbound_no &"', '" & strremark & "', '" & strforwarder_pickup & objConn1.Execute strSQL Response.Write("") Response.Write("alert (""Hello"");") response.write("") Response.redirect "OS_addnew.asp" end if Please Help. Thanks
find 10 times the last record of page 3). FrontPage Client Discussions Expression Web (1) Response.write (1) SqlStrCount (1) NoOfRecs (1) SqlStr (1) CStr (1) CInt (1) Conntemp.Close (1) Amateur End If End if If (Request.Querystring("cmd") = "Find") Then If (rs.EOF<> True) Then Response.write " <tr class = 'listpageresultheader'> " Response.write "<td> < / td> " Response.write "<td align = "+qu+"left"+qu+" valign = "+qu+"top"+qu+" class = "+qu+"listsave"+qu+"> " Response.write
recordset data getting truncted during response.write IIS I have an ASP app that we've moved from a Windows 2000 to Write out the headers for the columns below For i = 1 to Ubound(arrRS, 2) Response.write """" & arrRS(arrPONumber, i) & """" & ", " Response.write arrRS(arrRevNumber, i) & ", " Response.write """" & arrRS(arrPOStatusDesc, i) & """" & ", " Response.write """" & arrRS(arrLicName, i) & """" & ", " Response.write arrRS(arrOrderDateStamp, i) & ", " Response.write