Answered by:
Button not working

Question
-
Greetings. I have a button inside of a script editor on my web part page that is supposed to go to another page when clicked. except all it does is reloads the current page. What am I doing wrong? The script is below.
<FORM METHOD="LINK" ACTION="http://social.msdn.microsoft.com">
<INPUT TYPE="submit" VALUE="HTML Button">
</FORM>Thursday, January 29, 2015 2:17 PM
Answers
-
Can you use Link List(App) and create a item which will redirect you anywhere. Show it as web part in that page. It will have more flexibility.
Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.
- Edited by Sudip Misra Monday, February 2, 2015 4:06 PM
- Marked as answer by wakgtech911 Friday, February 6, 2015 1:27 PM
Thursday, January 29, 2015 4:06 PM
All replies
-
Can you use Link List(App) and create a item which will redirect you anywhere. Show it as web part in that page. It will have more flexibility.
Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.
- Edited by Sudip Misra Monday, February 2, 2015 4:06 PM
- Marked as answer by wakgtech911 Friday, February 6, 2015 1:27 PM
Thursday, January 29, 2015 4:06 PM -
Thanks for the reply, but I have no idea what you mean. Link List? Create and item?
regards,
wakgtech
Thursday, January 29, 2015 4:28 PM -
Hi,
Please add the following HTML code into a script editor web part in the page.
<INPUT TYPE="button" VALUE="HTML Button" onclick="javascript: window.location.href='http://social.msdn.microsoft.com'; "/>
When you click the button, it will go to "http://social.msdn.microsoft.com".
Thanks,
Dennis Guo
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.Dennis Guo
TechNet Community Support- Proposed as answer by Patrick_Liang Friday, February 6, 2015 2:24 AM
Friday, January 30, 2015 5:20 AM -
try "javascript:window.location.href=msdn.microsoft.com" in onclick event of button it will work..
--------------------------------------------------------------------------------------------------------------------------------------
Please mark answer as correct if it is correct else vote for it if you find it useful Happy SharePointingFriday, January 30, 2015 2:26 PM