Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript solution for ASP UPLOAD

Status
Not open for further replies.

JimFL

Programmer
Jun 17, 2005
131
GB
Hi,

I am struggling to find support for the javascript with the ASP object. All notes on the supporting documentation are in VBSCRIPT:


Does anyone know how I would write the following code in ASP javascript?

CODE AS FOLLOWS:

For Each File in Upload.Files

If File.ImageType <> "GIF" and File.ImageType <> "JPG" Then
errDesc = "GIF or JPG files only please!"
file.Delete
imgErr = true
Exit For
End If
If File.ImageWidth > 150 Then
errDesc = "Image width cannot exceed 150 pixels."
file.Delete
imgErr = true
Exit For
End If

If File.ImageHeight > 200 Then
errDesc = "Image height cannot exceed 200 pixels."
file.Delete
imgErr = true
Exit For
End If


Next

 
If you're asking for the javascript syntax, you might find more help in forum216.

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top