Click to See Complete Forum and Search --> : Paypal Button - XHTML 1.0 Strict Errors


mjmuk
08-03-2006, 04:26 AM
I may be missing something simple here, but...

I have set up a Paypal donate button on a web page http://www.nhswatch.info, the button functions fine, but when I validate this or any of the other pages where the button appears against the W3C validator at http://validator.w3.org/detailed.html (http://vallidator.w3.org/detailed.html) I get a number of errors relating to 'document type does not allow element "input" here'.

I've read my 'books' and have tried a number of workarounds to fix the errors, but do not seem able to crack this one, have I forgot something simple here?

Lines of Paypal code are:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="donate@nhswatch.info" />
<input type="hidden" name="item_name" value="donation to www.nhswatch.info" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="currency_code" value="GBP" />
<input type="hidden" name="tax" value="0" />
<input type="hidden" name="bn" value="pp-donationsbf" />
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="donate with paypal" />
</form>

Any feedback very welcome. :o

Charles
08-03-2006, 04:37 AM
The FORM element cannot directly contain inline elements and form controls are inline elements. You need a block level element or two between, DIV and FIELDSET work well.

mjmuk
08-06-2006, 02:19 AM
Hi, many thanks for your reply. Do you have an example of how to use the DIV and FIELDSET you mentioned.

Mike :confused:

Charles
08-06-2006, 05:27 AM
http://www.w3.org/TR/REC-html40/interact/forms.html

mjmuk
08-21-2006, 09:07 AM
Some time after the event, just wanted to let you know that the error was to do with absolute CAP letters at the distant site, had to enter the correct codes for ID then it all worked!!!

Many thanks.

Mike :rolleyes:

chirag
08-22-2006, 01:35 AM
Have you got solution to your problem ?

you can visit
http://www.liquid-internet.co.uk/content/dynamic/pages/series1article1.aspx
But, tell me if anyone has any other solutions to this problem..
I am using visual studio 2003