Results 1 to 4 of 4

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

  1. #1
    Join Date
    Aug 2005
    Posts
    54
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Ajax tabs content script - page with <form> tag won't display in Firefox

    1) Script Title: Ajax Tabs Content Script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...axtabscontent/

    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?

    Code:
    <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>

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That markup looked invalid to me and just to be sure, I ran it past the W3c validator, and it wasn't. Try this (which passed):

    Code:
    <!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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    man i'm glad i found this post... that is a godsend... thx

  4. #4
    Join Date
    Jul 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs down Thanks

    I'am so glad too, that I found this...

    Thank You very mich for posting this!

    Fabian

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •