Response.Writing Rows based on If Staments

M

Mark Sargent

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=<%=FilePath%>"><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>
 
R

Ray at

Mark Sargent said:
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
 
M

Mark Sargent

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...
 
M

Mark Sargent

ooops, drunk or not drunk, excuse my colorful language...be back
tomorow....cheers...

Mark, still drunk, Sargent,...
 
M

Mark Sargent

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.
 
M

Mark Sargent

figured it out..just had to put the <tr> tags before the <%> tags..cheers..

Mark Sargent.
 

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
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top