- Function getPopupJavascript(ByVal psUrl As String) As String
-
- Dim vsRetour As String
-
- Try
- Dim voWebClient As New System.Net.WebClient
- Dim voBitmap As New System.Drawing.Bitmap(voWebClient.OpenRead(psUrl))
- Dim viImageHeight As Integer = voBitmap.Height + 25
- Dim viImageWidth As Integer = voBitmap.Width + 20
- vsRetour = "javascript:window.open('" & txtUrl.Text & "','popup','width=" & viImageWidth.ToString() & ",height=" & viImageHeight.ToString() & ",status=no,menu=no,scrollbars=auto,location=no,resizable=no');"
- Catch ex As Exception
- vsRetour = "javascript:alert('L\'url n'est pas une image')"
- End Try
-
- Return vsRetour
-
- End Function
Function getPopupJavascript(ByVal psUrl As String) As String
Dim vsRetour As String
Try
Dim voWebClient As New System.Net.WebClient
Dim voBitmap As New System.Drawing.Bitmap(voWebClient.OpenRead(psUrl))
Dim viImageHeight As Integer = voBitmap.Height + 25
Dim viImageWidth As Integer = voBitmap.Width + 20
vsRetour = "javascript:window.open('" & txtUrl.Text & "','popup','width=" & viImageWidth.ToString() & ",height=" & viImageHeight.ToString() & ",status=no,menu=no,scrollbars=auto,location=no,resizable=no');"
Catch ex As Exception
vsRetour = "javascript:alert('L\'url n'est pas une image')"
End Try
Return vsRetour
End Function