View Full Version : Tab Content Script using it with form tag

02-09-2007, 01:04 PM
Tab Content Script


i use that script with asp.net but there is a problem. i cant call a page contain <form id="form1" runat="server">. if i delete that row then it success but aspx page crash down. (gridview must be placed inside a form tag with runat=server). js error row is "document.getElementById(containerid).innerHTML=page_request.responseText" and says undefined error.

how i can fix the problem?

02-09-2007, 03:48 PM
You might get more help in an asp.net forum. I can tell you that the runat="server", as far as I know only works as an asp page is loading. When using Ajax or any dynamically added content, it would be meaningless at best. If you want your content parsed by the server, it would need to be loaded into a window, a frame or an iframe, not a division as is the case with this script. But, as I say, check with an asp.net forum somewhere as there may be a workaround.

02-10-2007, 09:30 AM
it's not asp.net problem. if i use htm page contain <form> tag, i see same error.

02-10-2007, 12:24 PM
Then I misunderstood your question. Validate your markup. Especially with the form tag and with tables (but also with all types of markup), if the imported content is invalid and/or the page's markup that you are importing to is invalid, some (if not all, depending upon how bad the errors are) browsers just can't parse the resulting HTML.

02-12-2007, 08:17 AM
i fixed the problem like that;

function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText.replace(/<form/, "<orm")

form is not important for me only asp.net wants it, so i replaced it.