I want to use the value of a Label(Label1), that as the path of an image, to make it as an argument of the funtion P_OpenWindow...
But this is not working...
Can anyone help me?
I have a file.aspx with the code:
<SCRIPT>
function P_OpenWindow(pURL,pName,pFeatures){
window.open(pURL,pName,pFeatures)
}
</SCRIPT>
and I got the file.aspx.vb, on the Page_Load I've the code below:
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
If you would post the URL of your page so that we could see what on Earth it is that you are up to.
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
Dim scmdIM As New System.Data.SqlClient.SqlCommand
scmdIM.Connection = New System.Data.SqlClient.SqlConnection(strConn)
scmdIM.Connection.Open()
With scmdIM
.CommandText = "SELECT imagem FROM Modulos " + _
"WHERE produto = @num and ordem= @ordem"
.Parameters.Add(New System.Data.SqlClient.SqlParameter("@num", ide))
.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ordem", i))
.Connection = scmdIM.Connection
End With
Dim drIM As SqlDataReader = scmdIM.ExecuteReader(CommandBehavior.CloseConnection)
While drIM.Read
If Not IsDBNull(drIM.Item("imagem")) Then
If drIM.Item("imagem") <> "" Then
Dim im As String
im = drIM.Item("imagem")
Me.Label1.Text = drIM.Item("imagem")
img_item2.Attributes.Add("onclick", "javascript:P_OpenWindow2(document.getElementById('" & Me.Label1.ClientID & "').value,'','width=819,height=518');")
end if
end if
end while
Bookmarks