Can anyone suss this out for me?...
its a confirm box used on an asp created page: -
// to call the funtion
<a href="&"javascript:void(null)"&" onClick="&"confirm_delete("& newsId &"); return false"&">Delete</a>
// the function
<script language="javascript">
function confirm_delete (newsId)
{
var message = "Are you sure you want to delete?";
var return_value = confirm(message);
if ( return_value == true )
{
window.location.href="http://www.google.com";
}
}
</script>
the window.location just doesn't work, I hear the clicking sound but nothing happens, if I change to window.open it works fine, but I obviously dont want it in a new window. I have tried messing around with various syntax but not really sure what to do.
Any ideas very much appreciated
dan
its a confirm box used on an asp created page: -
// to call the funtion
<a href="&"javascript:void(null)"&" onClick="&"confirm_delete("& newsId &"); return false"&">Delete</a>
// the function
<script language="javascript">
function confirm_delete (newsId)
{
var message = "Are you sure you want to delete?";
var return_value = confirm(message);
if ( return_value == true )
{
window.location.href="http://www.google.com";
}
}
</script>
the window.location just doesn't work, I hear the clicking sound but nothing happens, if I change to window.open it works fine, but I obviously dont want it in a new window. I have tried messing around with various syntax but not really sure what to do.
Any ideas very much appreciated
dan
















