0

Evening All, I have a Jquery function running from my aspx page (When a button is clicked). It runs a [webmethod] which if successful returns to the 'OnSuccess' function. From here I want to navigate the user to: /Project/Invoices/List.aspx

 function Onsuccess(CommentSuccessfullyUpdated) {
        if (CommentSuccessfullyUpdated == "TRUE") {
            window.location = Invoices/List.aspx //My attempt, but unsuccessful
        }
        else {
            alert("Invoice/Details- Error: Removing Invoice.");
        }
    }

I think its something to do with window.location but this is as far as I have got..... Any ideas?

4

1 回答 1

0

您的 List.aspx 页面URL 需要用引号括起来" "或者' '

if (CommentSuccessfullyUpdated == "TRUE") {
    window.location = 'Invoices/List.aspx';
}
于 2013-03-29T10:51:30.650 回答