I’m really new to ASP.NET and javascript so I’m rather lost on how to do a lot of things. But what I really need to do right now is this:
The website I’m working on has a link that makes makes an http request, and is located inside a grid, as such:
<a target="_blank" href='<%# Eval ( "ServerURL","{0}Thing.aspx") %>'>
What I need to do is write a javascript function at the top that takes the place of this line, so that I can check another element in the grid, and only make the http request when that other element is of a certain value. I tried rewriting it as such:
<a target="_blank" href='javascript:Call(<%# Eval ( "ServerURL","{0}Thing.aspx") %>);'>
and the function Call at the top:
<script type="text/javascript">
function Call (url){
return url;
}
</script>
But all it does is open a new tab with about:blank for the url. What is it that I should be doing here?
rewrite it to
html
javascript
demo at http://jsfiddle.net/efQ6R/