quinnipiac0807
Programmer
This should be a fairly easy question and I'm not sure why I can't get this to work. I have an asp:button on my page and a javascript function in the html. I need to call this funtion using c# on the btnCancel_Click() event. I'll show you the funtion and the code I'm using but for some reason it's not working.
Javascript funtion. (This works)
<script language="javascript">
function WhereTo()
{
location.href == history.back(-1);
}
</script>
I'm calling it using this line.
Response.Write("<script language=javascript>javascript:WhereTo()</script>");
For some reason this doesn't work. Any suggestions.
Thanks in advance.
Javascript funtion. (This works)
<script language="javascript">
function WhereTo()
{
location.href == history.back(-1);
}
</script>
I'm calling it using this line.
Response.Write("<script language=javascript>javascript:WhereTo()</script>");
For some reason this doesn't work. Any suggestions.
Thanks in advance.