| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Please help me out here....seems simple enough, but not working
Page 1: Code:
<form action="asppage2.asp" method="post"> <% zz = 1%> <input type="checkbox" name=<%= zz%> value="something"> <input type="image" src="blahblah"> </form> Page 2: Code:
<% if (Request.Form("1")="on")
{
(Response.Write("works"))
}
%>
error on the second page is "object doesn't support this property or method" can you please help me out here. |
|
#2
|
||||
|
||||
|
Hi,
change Code:
<input type="checkbox" name=<%= zz%> value="something"> to <input type="checkbox" name="<%= zz%>" value="something"> what serverside code are you using? It looks like javascript, then change to if statement to this Code:
<% if (Request.Form("1")=="on")
{
Response.Write ("works")
}
%>
if its vbscript, use this if Code:
<% if Request.Form("1") = "on" then
Response.Write ("works")
end if
%>
hope this helps
__________________
Look! Its a ShemZilla ![]() ![]()
|
|
#3
|
||||
|
||||
|
don't use number as name for your elements.
as for syntax, nofriends is right - comparison is done using the "==" operator in JScript. |
|
#4
|
||||
|
||||
|
LoL, and again BBD bumps in and whines about this post being in the wrong forum...
![]() |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > checkbox help....easy |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|