I want to use the return value of a javascript function into a .net webgrid. However, when I click on the imagebutton it takes in a variable passed in from javascript function to produce the image link... How would I do this?
Here is the code I have..
Protected Sub btnPDF_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)
Dim cellItem As CellItem = DirectCast(DirectCast(sender, ImageButton).NamingContainer, CellItem)
Dim certNumID As String = displayGrid.Rows(cellItem.Cell.Row.Index).GetCellV alue(displayGrid.Bands(0).Columns.FromKey("CERTIFI CATENUM")).ToString
Dim documentID As String = String.Format("'javascript:ViewCert()'")
Dim url As String = ResolveUrl("~/ContractUnderwriting/CUViewDoc.aspx?docID=" & documentID & "&certNum=" & certNumID)
Dim script As String = "<script type=""text/javascript"">window.setTimeout(""OpenWin('" & url & "', 'location=no,directories=no,menubar=no,titlebar=no ,toolbar=no,resizable=yes,width=777px', 'Loan Document')"", 200);</script>"
litStartupScriptHolder.Text = script
End Sub
The javascript is supposed to take a value in the cell row for which the Image was clicked...
<script type="text/javascript">
function viewCell()
{
var grid=igtbl_getGridById("displayGrid");
alert(grid.Rows.getRow(0).getChildRow(0).getCell(0 ).getValue());
}
</script>
Any suggestiosn?