OT: asp programming
Walter Vaughan
wvaughan at steelerubber.com
Sat May 31 16:00:08 PDT 2008
Enrique Arredondo wrote:
>Can some one tell me where or who can help me out with asp / css / html
>code ? I inherited a www server and I can't make the thing display the
>selected="selected" work on one of the files. Any clues?
>
> <form method="post"
>action="http://call2install.com/applications/tech/product.asp?getresult=true">
> <span class="headertext2">Year</span><br />
> <select name="year" id="year" onchange="loadMakes()" >
> <option value="">Choose..</option>
> <%for x=1974 to year(date)
> if x=request.querystring("year") then%>
> <option selected="selected" value=<%=x%>
>
>
>><%=response.write(x)%></option
>>
>>
> <option value=<%=x%>><%=response.write(x)%></option>
> <%else%>
> <option value=<%=x%>><%=response.write(x)%></option>
> <%end if%>
> <%next%>
> </select> <br /><br />
>
I am just starting to learn some asp.net stuff, but it looks like your
first problem is formatting
when you are trying to debug problems like this...
Try to rewrite the whole mess without coming in and out of asp code so much
This is not tested, and is probably wrong, so rewrite to do what you want.
<><%
for x = 1974 to year(date)
if x = request.querystring("year") Then
response.write "<option selected='selected' value=" & x
& ">"
response.write x & "</option>"
else
response.write "<option value='" & x & "'>" & x &
"</option>"
end if
next
%>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20080531/0331a93f/attachment.html
More information about the Filepro-list
mailing list