I am having trouble with my code. I am using SharePoint 2013 and am trying to implement codes to get my buttons to redirect a user to another page. However, the buttons do not seem to function. Can anyone point out what I am doing wrong? Is it the code?
Example of the button codes:
<input id="btnSearch" onclick="return RedirectUrl();" type="button" value="Carian"/>
<input id="btnHome" onclick="return RedirectUrl(/itasset/_layouts/15/start.aspx#/Lists/it_list/AllItems.aspx);" type="button" value="home"/>
Example of the page: enter image description here
Apparently you have a javascript function that redirects you to the new page. That function expects a variable as a string, so put the url between single quotes.
Try this:
RedirectUrl('/itasset/_layouts/15/start.aspx#/Lists/it_list/AllItems.aspx')
And ofcourse RedirectUrl() has no variable so it won't work.