473,394 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Auto-inserted "input" element is causing XHTML 1.0 Strict validation to fail

Hi all:
I originally posted this in an HTML forum, but have realized that the
solution may (a) require a server-side change or (b) be non-existent.
In any case, since the page I'm dealing with is a PHP page and the
problem has to do with an auto-inserted "input" element, I'll post it
here, too. I'd appreciate any advice, commentary, or even pessimistic
sympathy if I'm just SOL. - Thanks.

I am pasting some code below that I am having a lot of trouble with. I
have a php guestbook page that I'm trying to validate, and I keep
getting an error stating that I can't have a certain "input" element in
a location in which I am not actually attempting to place one at all. I
have tried to enclose all other input elements in blocks of "td" tags,
which has worked for the most part, but because this particular input
element seems to be dynamically generated, I can't figure out what I
ought to do to prevent it from producing this kind of error.

Here's the error code:

Error Line 71 column 153: document type does not allow element "input"
here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div",
"pre", "address", "fieldset", "ins", "del" start-tag.

....="fa4a5c7b4eab7d80abb333272ea9d308" /><table
style="width:100%;"><tr><td cols

Here is the PHP code in which this is actually occuring (I've verified
that this is where it's occurring by making minute changes and
re-viewing a validation check):

print "<form method=\"post\"
action='guestbook.php?guestbook=$guestbook;'>";
[auto-insert of input element seems to be occurring here]
print "<table style=\"width:100%;\">";
....
print "</table>";

And here's the actual URL:

http://jetweedy.com/guestbook.php
So, my question is, since I know there may not be a lot I can do to
prevent the auto-insertion, does anyone have any suggestions on how I
might code around such an expected auto-insertion of an input element?
This is the only page on which I've had this problem, even though my
(much more complicated) weblog page validates perfectly (with the
exception of my web host's auto-inserted raw ampersands in the URL
links), and that page contains even more forms that are built in a
virtually identical fashion.

If anybody has any suggestions, that would be great.

Thanks,

Jon

Oct 6 '05 #1
3 3737
Jonathan wrote:
<snip>
element seems to be dynamically generated, I can't figure out what I
ought to do to prevent it from producing this kind of error.

Here's the error code:

Error Line 71 column 153: document type does not allow element "input"
here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div",
"pre", "address", "fieldset", "ins", "del" start-tag.

...="fa4a5c7b4eab7d80abb333272ea9d308" /><table
style="width:100%;"><tr><td cols

<snip>

http://in2.php.net/session#ini.url-rewriter.tags

Also, you may turn off
<http://in2.php.net/session#ini.session.use-trans-sid> so that it won't
rewrite URLs

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Oct 6 '05 #2
Thanks for the links, however I don't have access to the php.ini files
for this site (it's shared, paid webspace). The information suggested
using "fieldset" tags, but I still need a "form" element in there (or
do I?), and as long as the "form" element is there, it's auto-inserting
a "hidden" input element that contains my PHPSESSID value.

Oct 6 '05 #3
Solved it by using a function to reset the php.ini settings (didn't
realize I could do that! :)

Thanks for the help.

Oct 6 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: giancarlodirisioster | last post by:
Can someone help me modify this for future Usenet archival and to help me solve what I don't know? <form name="addform" method="POST" action="./submit.php"> <input type="text" name="Box 1"...
0
by: Thomas Due | last post by:
Hello, I am in the process of making my asp.net form to validate as xhtml 1.0 strict. So far I am doing well, but now I have a problem. The problem concerns specifically DropDownList and...
2
by: Yolande | last post by:
Hi there, I have a C# web service and I want to specify the lower bound and upper bound of input value. e.g. public long MilesToKilometers(long lngMiles). I want the input value for lngMiles...
1
by: John | last post by:
Hi, I would like to update my form after something is intered into a textbox in real time. For instance, Box A has a blank entry and I enter in 5. Box B I enter in 6 so in Box C it should...
4
by: Kjell Arne | last post by:
Hi! I have a detailsview control in a webpart with some templated fields on. I set the ValidationGroup property to som value on these fields to distinguish from other web parts on the page....
13
by: Lee | last post by:
I have this function that doesn't work. I pass it the td element and an id, and it makes an input field inside the td. That part workds. What doesn't work is that I want to add an "onkeyup" on...
4
by: Paul J. Lucas | last post by:
I have a simple form that contains an INPUT element that has an initial value. <form name="Form"> <input name="Number" type="text" value="Hello"> </form> When the form loads, I want all of...
7
by: Ed Jay | last post by:
I'm trying to validate a form's file input elements using javascript, but I'm getting nowhere. How can javascript test if a file has been selected using a file form input element? -- Ed Jay...
3
by: Arielle | last post by:
Problem: Using an XHTML doctype for all our pages, this is not optional. The layout the client wants to use requires the site to be "full screen" with a header, footer, horizontal menu, and main...
1
by: volynetsv | last post by:
Hello. I have a small problem, here's code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.