470,810 Members | 880 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,810 developers. It's quick & easy.

Response.Writing Rows based on If Staments

Hi All,

been away from developing, if you can call what I do that, and am stumped
already..lol..see code below. I'm trying to get each row to display, based
on the if statements. Hope you can help me here. Cheers.

P.S. ? will appear in place of Japanese characters. Thanx for your
understanding.

Mark Sargent.

Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/Classifieds/UploadScript.asp, line 63
<td>File Type Error</td>

.................................................. .........................
Error code is identified here
.................................................. .........................

<table align="center" bgcolor="#00FF00">
<tr>
<td width="55%">
<p align="center"><br>
<%
Dim strPath
strPath = "/Classifieds/ImageUploads"
Set Upload = Server.CreateObject("Persits.Upload")
Upload.OverwriteFiles = False
Count = Upload.SaveVirtual(strPath)
If Err <> 0 Then
Response.write ("Err.Description")
End if
For Each File in Upload.Files
If File.ImageType <> "JPG" Then
WrongFileType = "????.jpeg??????????????????????????????"
File.Delete
End If
If File.Size > 50000 Then
FileTooBig = "????????????50000??????????(" &File.Size&"bytes).
?????????????????????????????."
File.Delete
End If
Next
Dim ImageWidth
Dim ImageHeight
Dim FilePath
For Each File in Upload.Files
FilePath = File.Path
ImageWidth = File.ImageWidth
ImageHeight = File.ImageHeight
Next
FilePath = replace(FilePath, "\", "/")
FilePath = replace(FilePath, "RemovedForSecurity", "")
%>
</td>
</tr>

<tr> <%If WrongFileType <> "" Then
.................................................. ...........................
.................................................. ...........................
.................................................. ........
<td>File Type Error</td>
.................................................. ...........................
.................................................. ...........................
.................................................. .........
<td>Response.Write WrongFileType &"<br>" %>
<a href="ClassifiedUploadImage.asp"><font color="#000000"><b>Try
Again</b></font></a>

<td width="55%"></td>

<%
ElseIf FileTooBig <> "" Then
<td>File Too Big</td>
<td>Response.Write "<font face=""MS P????, MS P??, MS UI Gothic,
MS ????, MS ??"">" &FileTooBig &"</font><br>"%>
<a href="ClassifiedUploadImage.asp"><font color="#000000"><b>Try
Again</b></font></a>
<td width="45%"></td>
</tr>

<%
Else
For Each File in Upload.Files
<tr>
<td>File Name</td>
<td> Response.Write File.FileName & "(" & File.Size & "bytes)
uploaded to easyboarder. <BR>"</td></tr>
Next
<tr>
<td>Image Width</td>
<td>Response.Write "Image Width:"&ImageWidth &"<br>"</td>
<tr>
<td>Image Height</td>
<td>Response.Write "Image Height:"&ImageHeight &"<br>"%>
<td width="55%"></td>

<tr>

<td width="55%"> <font color="#FFFFFF" size="2" face="MS P????, MS P??,
MS UI Gothic, MS ????, MS ??"><b>????????????????????????????????</b></font>
<td width="45%"><font color="#FFFFFF" size="2" face="MS P????, MS P??,
MS UI Gothic, MS ????, MS ??"><b><a
href="ClassifiedImageResize.asp?FilePath=<%=FilePa th%>"><font
color="#000000"><b>Resize
Image</b></font></a></b></font>
<p align="center"><font color="#FFFFFF" size="2" face="MS P????, MS
P??, MS UI Gothic, MS ????, MS ??"><b>
</b></font>
<p align="center">
<p align="center"></td>
<form name="form2" method="post" action="ClassifiedNewDetails.asp">
<input type="submit" name="Submit" value="Continue">
<br>
<input type="hidden" name="FilePath" value="<%= FilePath%>">
<br>
<input type="hidden" name="hiddenField2" value="<%=
Session("MM_Username")%>">
<%
End If
%>
</form>
</tr>
</table>
Jul 19 '05 #1
6 1828

"Mark Sargent" <do*********@hotmail.com> wrote in message
news:u5**************@tk2msftngp13.phx.gbl...
Hi All,

been away from developing, if you can call what I do that, and am stumped
already..lol..see code below. I'm trying to get each row to display, based
on the if statements. Hope you can help me here. Cheers.


Are you getting an error? What are you trying to do that's not happening?
The code you posted had "if this then response.write that end if" in various
places. So, what's the issue?

Ray at work
Jul 19 '05 #2
dunno..pretty drunk at the mo..perhaps I'm the problem...lol...thought I
posted the actual error...shit, perhaps I need another cold one,
eh..cheers..

Mark, I'm pretty drunk, Sargent...
Jul 19 '05 #3
Okay

"Mark Sargent" <do*********@hotmail.com> wrote in message
news:ua**************@TK2MSFTNGP11.phx.gbl...
dunno..pretty drunk at the mo..perhaps I'm the problem...lol...thought I
posted the actual error...shit, perhaps I need another cold one,
eh..cheers..

Mark, I'm pretty drunk, Sargent...

Jul 19 '05 #4
ooops, drunk or not drunk, excuse my colorful language...be back
tomorow....cheers...

Mark, still drunk, Sargent,...
Jul 19 '05 #5
okay, now that I'm sober..damn the Rugby World Cup...what I was attempting
to do, was, have a row appear when a condition was met, but, got the
following error,

Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/Classifieds/UploadScript.asp, line 63
<td>File Type Error</td>

I don't understand it. Cheers.

Mark Sargent.
Jul 19 '05 #6
figured it out..just had to put the <tr> tags before the <%> tags..cheers..

Mark Sargent.
Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Rick Cook | last post: by
3 posts views Thread by Keith | last post: by
1 post views Thread by Brian | last post: by
8 posts views Thread by Scott C. Reynolds | last post: by
118 posts views Thread by Chuck Cheeze | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.