Re: Spotted a Design Feature

  •  02-16-2004, 2:53 PM

    Re: Spotted a Design Feature

    original code in browse_img.asp file:

     

     For Each fil In fc 'add the html for the files
      If (InStr(fil.name, ".gif" ) <> 0) Or (InStr(fil.name, ".jpg" ) <> 0) Or (InStr(fil.name, ".png" ) <> 0) Then
       s = s & "<tr><td NOWRAP align=""left"" valign=""top"" style=""cursor:hand"" ondblclick=""parent.insert_Image(parent.previewpic);""  onclick=""parent.previewpic.src = '"& ImageGalleryPath & folpath & fil.name & "'; parent.imgpath.value='" & folpath  & fil.name & "'; parent.imgname.value='" & ImageGalleryPath & folpath & fil.name & "'; highlightcell(this)"" >" & vbcrlf
       s = s & "<div align=""left"">" & fil.name & "</div></td></tr>" & vbcrlf
      End If
     Next

     

    Changed Code:

     

     For Each fil In fc 'add the html for the files
      If (InStr(lcase(fil.name), ".gif" ) <> 0) Or (InStr(lcase(fil.name), ".jpg" ) <> 0) Or (InStr(lcase(fil.name), ".png" ) <> 0) Then
       s = s & "<tr><td NOWRAP align=""left"" valign=""top"" style=""cursor:hand"" ondblclick=""parent.insert_Image(parent.previewpic);""  onclick=""parent.previewpic.src = '"& ImageGalleryPath & folpath & fil.name & "'; parent.imgpath.value='" & folpath  & fil.name & "'; parent.imgname.value='" & fil.name & "'; highlightcell(this)"" >" & vbcrlf
       s = s & "<div align=""left"">" & fil.name & "</div></td></tr>" & vbcrlf
      End If
     Next

View Complete Thread