I am using YUI tabview in my form, which has a submit button at the end (the 5th tab), the issue is that the validation is working fine, but I can not see the pop up message since I am in the last tabview(which contain the final submit button) instead of the tabview of the form element being checked ( with checkValidity
).
I am using this : http://developer.yahoo.com/yui/examples/tabview/frommarkup.html
This is the how it looks like : http://jsfiddle.net/D4GmQ/3/
When I click on the first submit button in the first tab it shows up the pop up , but when I click from the last one it throws a Javascript error.
my question is : is there a way to change the tab to the one containing the element being checked ?
This is the solution for this problem, jsfiddle
You can compare it to the original issue here.
Since there is no YUI2 function that changes the tabView automatically, then the idea is to add a function that searches the input that will be validated and activates the tabView that contains it, this way we can see the html5 popup message.
<div id="tab3"><p>Tab Three Content</p>
<button onclick="ToolData.tabs.selectTab(0);"> submit </button>
</div>