Myreader.co.uk  
uk news, chat and community
   home   |   control panel login   |   archive   |  
 
net
net
news.announce
news.config
news.management
news.moderation
providers
providers.aaisp
web.authoring
  
 
date: Thu, 28 May 2009 12:37:09 +0100,    group: uk.net.web.authoring        back       
Paypal button stops W3C validation   
I've added a paypal donate button to a web page, using the code provided 
by paypal. Now the W3C validator, which used to validate ok as strict 
HTML 4.01 shows lots of errors.

The code I have is:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="5455784">
<input type="image" 
src="https://www.paypal.com/en_GB/i/btn/btn_donate_LG.gif" border="0" 
name="submit" alt="PayPal - The safer, easier way to pay online.">
<img alt="" border="0" 
src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>


The web page is here:
http://www.g8wrb.org/

The validator complains - see
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.g8wrb.org%2F;accept=text%2Fxml%2Capplication%2Fxml%2Capplication%2Fxhtml%2Bxml%2Ctext%2Fhtml%3Bq%3D0.9%2Ctext%2Fplain%3Bq%3D0.8%2Cimage%2Fpng%2C*%2F*%3Bq%3D0.5;accept-language=en-us%2Cen%3Bq%3D0.5;accept-charset=ISO-8859-1%2Cutf-8%3Bq%3D0.7%2C*%3Bq%3D0.7

Does anyone know how I can change the Paypal mess to something that will 
pass as strict HTNL?

A Google search showed others having similar issues, but I don't see any 
solutions.

-- 
I respectfully request that this message is not archived by companies as
unscrupulous as 'Experts Exchange' . In case you are unaware,
'Experts Exchange'  take questions posted on the web and try to find
idiots stupid enough to pay for the answers, which were posted freely
by others. They are leeches.
date: Thu, 28 May 2009 12:37:09 +0100   author:   Dave

Re: Paypal button stops W3C validation   
Dave wrote:
> I've added a paypal donate button to a web page, using the code provided 
> by paypal. Now the W3C validator, which used to validate ok as strict 
> HTML 4.01 shows lots of errors.
> 

Line 42: <br clear="all">

...is not valid HTML. It is XHTML. I suspect that the other issues might 
stem from that...

Suck it and see...
date: Thu, 28 May 2009 13:38:16 +0100   author:   CJM

Re: Paypal button stops W3C validation   
In article ,
 CJM  wrote:

> Dave wrote:
> > I've added a paypal donate button to a web page, using the code provided 
> > by paypal. Now the W3C validator, which used to validate ok as strict 
> > HTML 4.01 shows lots of errors.
> > 
> 
> Line 42: <br clear="all">
> 
> ...is not valid HTML. It is XHTML. I suspect that the other issues might 
> stem from that...
> 
> Suck it and see...

The clear="" is quite wrong, yes. But not the main problem. 

Use instead a proper style. Preferably class the BR and do it in a CSS 
sheet. But you could just:

<br style="clear: left;">

and, btw, to give a bit of grace when the donate button drops, on your 
last li item above:

<li style="margin-bottom: 1em"><a href="/links/">Links</a></li>

or something similar

About the form though, in 4.01 Strict you need to wrap inputs:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Title</title>
</head>
<body>
<!-- Paypal donate -->
<!-- http://www.g8wrb.org/cancel.php and  
http://www.g8wrb.org/thankyou.php -->
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<div>
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="5455784">
<input type="image" 
src="https://www.paypal.com/en_GB/i/btn/btn_donate_LG.gif"  
name="submit" alt="PayPal - The safer, easier way to pay online.">
<img alt="" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" 
height="1">
</div>
</form>
</body>
</html>

-- 
dorayme
date: Thu, 28 May 2009 23:15:10 +1000   author:   dorayme

Re: Paypal button stops W3C validation   
On 28 May, 12:37, Dave  wrote:
> I've added a paypal donate button to a web page, using the code provided
> by paypal. Now the W3C validator, which used to validate ok as strict
> HTML 4.01 shows lots of errors.

So edit the code and fix them.

There's nothing scacrosanct about Paypal button code, or Google
adscripts. If they're invalid, then fix it, same as you would your own
work. Sadly they usually are wrong  8-(   If you work with external ad-
serving agencies then the malformed mis-shapen crap they send your
poor readers is enough to make you weep.
date: Fri, 29 May 2009 09:41:55 -0700 (PDT)   author:   Andy Dingley

Re: Paypal button stops W3C validation   
Andy Dingley wrote:
> On 28 May, 12:37, Dave  wrote:
>> I've added a paypal donate button to a web page, using the code provided
>> by paypal. Now the W3C validator, which used to validate ok as strict
>> HTML 4.01 shows lots of errors.
> 
> So edit the code and fix them.

Easy if you know how. I suspect you are a web designer by trade - I am not.

> There's nothing scacrosanct about Paypal button code, or Google
> adscripts. If they're invalid, then fix it, same as you would your own
> work. Sadly they usually are wrong  8-(   If you work with external ad-
> serving agencies then the malformed mis-shapen crap they send your
> poor readers is enough to make you weep.

I must admit I am amazed at how much junk one sees in some web sites 
that are designed by pros.

Have you ever tried using the Adidas web site?
-- 
I respectfully request that this message is not archived by companies as
unscrupulous as 'Experts Exchange' . In case you are unaware,
'Experts Exchange'  take questions posted on the web and try to find
idiots stupid enough to pay for the answers, which were posted freely
by others. They are leeches.
date: Fri, 29 May 2009 22:53:57 +0100   author:   Dave

Re: Paypal button stops W3C validation   
dorayme wrote:
> In article ,
>  CJM  wrote:
> 
>> Dave wrote:
>>> I've added a paypal donate button to a web page, using the code provided 
>>> by paypal. Now the W3C validator, which used to validate ok as strict 
>>> HTML 4.01 shows lots of errors.
>>>
>> Line 42: <br clear="all">
>>
>> ...is not valid HTML. It is XHTML. I suspect that the other issues might 
>> stem from that...
>>
>> Suck it and see...
> 
> The clear="" is quite wrong, yes. But not the main problem. 
> 
> Use instead a proper style. Preferably class the BR and do it in a CSS 
> sheet. But you could just:
> 
> <br style="clear: left;">
Thank you. I did in fact have some CCS which did that.


> and, btw, to give a bit of grace when the donate button drops, on your 
> last li item above:
> 
> <li style="margin-bottom: 1em"><a href="/links/">Links</a></li>


I'll have to look at that. I have a php menu for this.

<div id="nav-menu">
       <ul>
         <li><a href="http://www.g8wrb.org/">Home</a></li>
         <li><a href="http://www.althorne.org/php/"><b>Uploads</b></a></li>

         <?php
          // Thanks to Geoff Berrow for the simpler menu
          // Slightly changed, so the index.php is not seen in links.
          $links=array(
           "Why donate?"=>"/why_donate/",
           "Mathematica"=>"/mathematica/",
           "Triodes"=>"/triodes/",
           "Tetrodes"=>"/tetrodes/",
           "Pentodes"=>"/pentodes/",
           "Bases"=>"/bases/",
           "Goodies"=>"/useful-stuff/",
           "Application notes"=>"/application-notes/",
           "Browse"=>"/data/",
           "Thanks to"=>"/thanks/",
           "Goodies"=>"/useful-stuff/",
           "Solaris laptop"=>"/useful-stuff/Sun/laptop/",
           "Y799"=>"/y799/",
           "YC156"=>"/yc156/",
           "New data"=>"/recently-added/",
           "WANTED"=>"/wanted/",
           "Yagi Uda"=>"/yagi/",
           "Help"=>"/help/",
           "Links"=>"/links/"
          );

         foreach($links as $key=>$value){
            // compare the actual file name with the data above, after 
appending
index.php"
            $fullfile=$value."index.php";
            $f=$_SERVER['PHP_SELF'] ;
            // echo "$f      $fullfile<br><br>";
            if( $_SERVER['PHP_SELF'] !=$fullfile)
                echo "<li><a href=\"$value\">$key</a></li>\n";
         }
         ?>
       </ul>

<br class="clearit">


I'll need to sort out how to add that in.

I do agree, the 'donate' button looks a bit odd.

> or something similar
> 
> About the form though, in 4.01 Strict you need to wrap inputs:

Thank you. As you will see if you check it again, it now validates as 
strict. I've not yet attempted to resolve the issue of the placement of 
the donate button, but I will do later.

Thank you.

-- 
I respectfully request that this message is not archived by companies as
unscrupulous as 'Experts Exchange' . In case you are unaware,
'Experts Exchange'  take questions posted on the web and try to find
idiots stupid enough to pay for the answers, which were posted freely
by others. They are leeches.
date: Fri, 29 May 2009 22:58:08 +0100   author:   Dave

Google
 
Web myreader.co.uk


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us