I use this code to make my page have same height in a browser, it works, but when i check the code for mistakes, it gives me 3 warnings:
Warning:
<form> proprietary attribute "runat"
Warning:
<form> lacks"action" attribute
Warning:
<script> inserting "type" attribute
The code I use:
<body style="overflow:hidden; margin:0">
<form id="form1" runat="server">
</form>
<script language="javascript">
function autoResizeDiv()
{
document.getElementById('main').style.height = window.innerHeight +'px';
}
window.onresize = autoResizeDiv;
autoResizeDiv();
</script>
Should I ignore those warnings? and as a method is it correct?
runat="server"
is asp.net specific attribute. It wont work in generic html scenario. What tech you are using for front end HTML4/5, PHP, ASP.NETYou should consider building your form tag soemthing like this (Taken from this page itself):
<form id="search" action="" method="get" > </form>