PDA

View Full Version : Ajax tabs content script - page with <form> tag won't display in Firefox



AshleyQuick
08-18-2006, 02:07 PM
1) Script Title: Ajax Tabs Content Script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/

3) Describe problem:

http://home.comcast.net/~maxpixel/dev

The tab for Cats contains a standard email form and will not display in Firefox. Is there a fix?



<table style="width: 300px">
<form name="formmail" action="contactform.php" method="post">
<tr>
<td class="light">Name</td>
<td><input name="Name" type="text" size="32" maxlength="150"></td>
</tr>
<tr>
<td class="light">Email</td>
<td><input name="Email" type="text" size="32" maxlength="150"></td>
</tr>
<tr>
<td class="light" colspan="2">Comments<br> <textarea name="Comments" rows="5" cols="37"></textarea>
</td>
</tr>
<tr>
<td colspan="2"><input class="send" type="submit" value="Send Form" onclick="return checkit()">&nbsp;</td>
</tr>
</form>
</table>

jscheuer1
08-18-2006, 10:26 PM
That markup looked invalid to me and just to be sure, I ran it past the W3c validator (http://validator.w3.org/), and it wasn't. Try this (which passed):


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>
<body>
<form name="formmail" action="contactform.php" method="post">
<table style="width: 300px">
<tr>
<td class="light">Name</td>
<td><input name="Name" type="text" size="32" maxlength="150"></td>
</tr>
<tr>
<td class="light">Email</td>
<td><input name="Email" type="text" size="32" maxlength="150"></td>
</tr>
<tr>
<td class="light" colspan="2">Comments<br> <textarea name="Comments" rows="5" cols="37"></textarea>
</td>
</tr>
<tr>
<td colspan="2"><input class="send" type="submit" value="Send Form" onclick="return checkit()">&nbsp;</td>
</tr>
</table>
</form>
</body>
</html>

It wouldn't work in AJAX tabs in FF until I made it like the above. Apparently <form> must be entirely within (in this case, that would be inside a <td>) or entirely contain a block element like a table.

When HTML is invalid, a browser may still be able to parse it but, once it is run through the process that AJAX tabs puts it through, it may no longer be recognizable if it wasn't valid to begin with.

parkley
08-09-2007, 08:06 PM
man i'm glad i found this post... that is a godsend... thx

fab75
07-03-2008, 09:50 AM
I'am so glad too, that I found this... :)

Thank You very mich for posting this!

Fabian