Reputation: 1
I have a JavaScript where I pass an event as a parameter on a click of a button and the script has to take the respective Id of the event, which I would then use to redirect to another page. The Code is as follows:
function eventClick(e)
{ var Id = e.TaskId;
document.location='../Task/Assignedtask?taskId=' + Id;
}
Upvotes: 0
Views: 36
Reputation: 26
Try document.location.href
- "href" being the part that seems to be missing in your code.
Upvotes: 1