Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-29-2003, 04:32 PM   PM User | #1
MrDoubtFire
New Coder

 
Join Date: Dec 2002
Location: Florida
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
MrDoubtFire is an unknown quantity at this point
XHTML Validation

I was validating a couple of pages (xhtml 1.1) and it told me that the <input> tag needed to be in another tag, it was illegal as it was (the code is below).


<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<fieldset>
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="business" value="xxxx@hotmail.com" />
<input type="hidden" name="display" value="1" />
</fieldset>
</form>


Now, the validator told me this:

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



I suppose my question is this: would a simple <fieldset> tag around all hidden fields fix this? Would this, considering that it is only hidden fields inside the fieldset, put the box around them (even though they don't show up on the page)? Would an <ins> tag be better to use?

Thanks,

MrDoubtFire
__________________
[ Digapay | $2 PER Email | Free Email | Design ]
MrDoubtFire is offline   Reply With Quote
Old 01-29-2003, 05:38 PM   PM User | #2
cg9com
Senior Coder

 
Join Date: Jul 2002
Posts: 1,628
Thanks: 0
Thanked 0 Times in 0 Posts
cg9com is an unknown quantity at this point
ive never even heard of fieldset
did you try just taking away that tag?
maybe just adding your form inside of another element like <p>

<edit message="remember an xhtml document is a XML document, and needs to be built the same way" />

Last edited by cg9com; 01-29-2003 at 07:19 PM..
cg9com is offline   Reply With Quote
Old 01-29-2003, 07:21 PM   PM User | #3
brothercake
Senior Coder


 
Join Date: Jun 2002
Location: near Oswestry
Posts: 4,508
Thanks: 0
Thanked 0 Times in 0 Posts
brothercake is an unknown quantity at this point
<fieldset> is an important part of form semantics (add the <legend> element and you get a little caption ) .. but it does seem a little pointless to use it around hidden elements;

I tried your example though, and it validates if you take out the "target" attribute; it seems that's deprecated

Last edited by brothercake; 01-29-2003 at 08:02 PM..
brothercake is offline   Reply With Quote
Old 01-30-2003, 04:12 PM   PM User | #4
MrDoubtFire
New Coder

 
Join Date: Dec 2002
Location: Florida
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
MrDoubtFire is an unknown quantity at this point
Thanks for the responses!

I wrote to Paypal and they told me that although it would be fine to remove the 'target="Paypal"' section, it would mess up the shopping cart a little. So I have to live with it until Paypal fixes their code.

Also as per the hidden elements, thankfully each section I have has a graphic/link from Paypal, which the fieldset/legend works fine with. It also does -not- add in extra spaces for each hidden input I have, which I thought it would.

MrDoubtFire
__________________
[ Digapay | $2 PER Email | Free Email | Design ]
MrDoubtFire is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:59 AM.


Advertisement
Log in to turn off these ads.