473,748 Members | 2,891 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.

....="fa4a5c7b4 eab7d80abb33327 2ea9d308" /><table
style="width:10 0%;"><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='guestbo ok.php?guestboo k=$guestbook;'> ";
[auto-insert of input element seems to be occurring here]
print "<table style=\"width:1 00%;\">";
....
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 3760
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.

...="fa4a5c7b4e ab7d80abb333272 ea9d308" /><table
style="width:10 0%;"><tr><td cols

<snip>

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

Also, you may turn off
<http://in2.php.net/session#ini.ses sion.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
5985
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" size="20" value="100.50"> + <input type="text" name="Box 2" size="20" value="200.50"> + <input type="text" name="Box 3" size="20" value="1.50"> = <input type="text" name="Total" size="20" value="302.50"> </p> </form>
0
367
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 ListBox, but other controls might result in the same problem. When AutoPostBack is enabled on these controls, two hidden input fields are created on the form (__EVENTTARGET and __EVENTARGUMENT), furthermore a "postback" javascript is embedded, this...
2
1626
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 is within . I expect that there are some properties can be set before actually executing the method. I don't want to validate the value in the method. Is there any help? If I cannot validate the value in the C# code (except within the method),...
1
2265
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 automatically give me 11 (if the code I put in is to add box A and B). Then in Box D I put in 3 (say to subtract from A and B combined) so then Box C adjusts to give me 8.
4
7717
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. However, I'm not able to set the same ValidationGroup on the submit controls on the detailsview. Those linkbuttons(update, insert) are auto generated now. 1. Is it possible to set ValidationGroup on the detailsview? 2. How would I go about...
13
14400
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 the input field. Any help? Please??? I don't get any error on my javascript console in firefox, and I am not seeing any errors in IE. // makes an input field that submits itself using setCalendarValue() when it's blurred (it will be blurred if...
4
2893
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 the text in the field to be automatically selected. How can I do this?
7
4600
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 (remove 'M' to respond by email)
3
3242
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 content area. The header may or may not be absolute, the menu and footer are absolute, and the main content is dynamic to fill the rest of the space. The idea is to use javascript to make up where css lacks forcing things to a full height. This...
1
2367
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 xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>iframe popup (JS)</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body>
0
8987
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9534
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9366
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4597
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.