Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
36
rated 0 times [  43] [ 7]  / answers: 1 / hits: 21020  / 11 Years ago, thu, august 1, 2013, 12:00:00

I have created .aspx page on my SharePoint site and inserted within the page HTML button.



Example



    <PublishingWebControls:editmodepanel PageDisplayMode=Display runat=server SuppressTag=True>
...
<button>Click Me!</button>
...
</PublishingWebControls:editmodepanel>


Every time I hit 'Click Me!' the post back occurs. This is not my desired behavior, but I have found a way how to not cause post backs. I added javascript code to onclick property <button onclick='return false;'>Click Me!</button>



My question is, why the post back occurs, even if the button does not contain type=submit property?



I checked also master page, which contains <form runat=server> and wraps all the content and there is also no action=page.aspx property.


More From » html

 Answers
10

Check this link, http://www.w3schools.com/tags/tag_button.asp
There is a note on page, which says, that different browsers can use different default type for button, if you don't specify it by yourself. Seems like your browser uses submit.


[#76592] Wednesday, July 31, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
korbindarrionh

Total Points: 598
Total Questions: 113
Total Answers: 104

Location: Burundi
Member since Wed, Nov 25, 2020
4 Years ago
;