Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: Please check my site for me  (Read 4484 times)

jansie

  • Guest
Please check my site for me
« on: July 10, 2007, 07:13:11 PM »

hi

first off, this is not spam. not trying to get attention for my site. i've been challenged that my site is not xhtml strict by someone at linkreferral.com, and i appreciate the guy's honesty. i did all i could to make it validate on my side, but the contact page does not validate.

what to do what to do!

here is the url for the page, with the message of why it won't validate. help is appreciated.

http://www.thebigfish.co.za/contact/

Error  Line 101 column 654: 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.

...dden" name="sum" id="sum" value="8" /><p><label for="c">* Perform an addition

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>").
« Last Edit: March 06, 2009, 02:11:33 PM by philmoz »
Logged

Joost

  • Guest
Please check my site for me
« Reply #1 on: July 10, 2007, 07:49:09 PM »

Remove:
Quote
onclick="window.open(this.href,'_blank');return false;"
This code is javascript and is used to open the link in a new window or tab. Xhtml can do the same, but does not validate in xhtml strict, you would have to change DTD to xhtml transitional 1.0
Logged

Harold

  • Full Member
  • ***
  • Karma: 0
  • Posts: 110
    • http://blog.haroldbeukers.nl/
Please check my site for me
« Reply #2 on: July 10, 2007, 08:19:07 PM »

i thought this line has to be in a paragraph

Code: [Select]
<input type="hidden" name="sum" id="sum" value="4" />
« Last Edit: August 29, 2007, 10:39:42 AM by Harold »
Logged
E=Fb

Joost

  • Guest
Please check my site for me
« Reply #3 on: July 10, 2007, 08:25:31 PM »

Line 101 column 813 empty  

Logged

jansie

  • Guest
Please check my site for me
« Reply #4 on: July 10, 2007, 08:25:40 PM »

hi joost

i doubt strongly if it is the javascript. that javascript link is there specifically to make the site pass xhtml strict (it validates xhtml, but i suppose it misses the spirit of xhtml in a sense). with normal html one would use the target=_blank method, but that doesn't validate. so i use the javascript redirect, which is valid.

thanks for your look into it in anycase.
Logged

jansie

  • Guest
Please check my site for me
« Reply #5 on: July 10, 2007, 08:27:29 PM »

ok, so now we're getting somewhere. the problem is, however, not in my code. the code is generated by the snews engine. so one would have to find the problem there. where, though?
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Please check my site for me
« Reply #6 on: July 10, 2007, 08:29:23 PM »

Seems that this is old ver.1.5.31 mathCaptcha validation bug. Code for that version that validates should look more like this:
Code: [Select]
// MATH CAPTCHA
function mathCaptcha() {
    $x = rand(1, 9);
    $y = rand(1, 9);
    $math = '<p><label for="c">* '.l('math_captcha').':</label>
';
    $math .= $x.' + '.$y.' = ';
    $math .= '<input type="text" name="calc" id="c" style="width: 30px;" /></p><p>';
   // Original code : $math .= html_input('hidden', 'sum', 'sum', $x + $y, '', '', '', '', '', '', '', '', '', '', '').'</p>';
   $xplusy = $x + $y;
   $math .= "<input type=\"hidden\" name=\"sum\" id=\"sum\" value=\"$xplusy\" /></p>";
    return $math;
}
There is forum thread on this issue as well.
« Last Edit: March 06, 2009, 02:11:06 PM by philmoz »
Logged