View Single Post
  #1 (permalink)  
Vecchio 02-04-2008, 10:54 PM
Louis Louis non è in linea
Junior Member
 
Registrato dal: Feb 2008
Messaggi: 8
predefinito Validazione w3c del codice per il carrello paypal nel sito

Ciao a tutti.
Dopo ore perse inutilmente, non sono riuscito a far validare il carrello fornito da paypal: mi da un sacco di errori che non riesco a risolvere.
Il codice fornito da loro è questo per visualizzare il carrello:

codice HTML:
<form name="_xclick" target="paypal" action="https://www.paypal.com/it/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="me@mybusiness.com">
<input type="image" src="https://www.paypal.com/it_IT/i/btn/view_cart.gif" border="0" name="submit" alt="Effettua i tuoi pagamenti con PayPal. È un sistema rapido, gratuito e sicuro.">
<input type="hidden" name="display" value="1">
</form>
Mentre è questo per il pulsante aggiungi al carrello:

codice HTML:
<form name="_xclick" target="paypal" action="https://www.paypal.com" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="me@mybusiness.com">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="item_name" value="HTML book">
<input type="hidden" name="amount" value="24,99">
<input type="image" src="http://www.paypal.com/it_IT/i/btn/sc-but-01.gif" border="0" name="submit" alt="Effettua i tuoi pagamenti con PayPal. È un sistema rapido, gratuito e sicuro.">
<input type="hidden" name="add" value="1">
</form>
Come doctype utilizzo questo:

codice HTML:
<!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" xml:lang="it" lang="it">
Uno degli errori che più comunemente mi riporta è questo:

Quote:
document type does not allow element "form" here; missing one of "object", "applet", "map", "iframe", "ins", "del" start-tag.

….com/it/cgi-bin/webscr" method="post">

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
oppure questo:

Quote:
end tag for "input" omitted, but OMITTAG NO was specified.

<input type="hidden" name="cmd" value="_cart">

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
e a volte altri.
Qualche anima pia sa come correggere il codice una volta per tutte così che vada bene per sempre?
Grazie mille e un saluto
Rispondi quotando