I have a column in grid which is of hyperlink type and when I click, it should take me URL on basis of JavaScript function. Now my question is how should I pass database column name as parameter into JavaScript function. I tried something which is not fruitful.
<ItemTemplate>
<td colname="time_type" >
<a ><%#DataBinder.Eval(Container.DataItem, "TYPE_SEQ")%></a>
</td>
</ItemTemplate>
function Time_type(<%# Eval( "TIME_TYPE_INDICATOR" ) %>,<%# Eval( "TYPE_SEQ" ) %>){
var url;
if (<%# Eval( "INDICATOR" ) %> == 'O'){
url= www.something.com/<%# Eval( "TYPE_SEQ" ) %>?;
}
else if(<%# Eval( "INDICATOR" ) %> == 'T'){
url= www.something.com/<%# Eval( "TYPE_SEQ" ) %>?;
}
}
The function here is taking 2 database columns as parameters and based on one parameter other parameter is used as query string in URL. My javascript function is not working and I know it is not right way to pass paramaters like this.Please help. **Also please show me how to call this function on hyperlink click **