Jump to content

Getting error with validation


990805

Recommended Posts

Hello,

 

Iam getting a validation error.

 

I know where the error is:

 

if($images[$a]['filename']==$images[$aktimg]['filename']) {

$html2 .= "\n<div class='vsig_top vsig_top".$identifier."'>";

if($_link_use_&&isset($$vsiglinks)){ //links are activated and set

$html2 .= "\n<a href='".$cur_link[0]."' title='".$cur_link[1]."' target='".$cur_link[2]."'>";

}

$html2 .= "\n<img id='topimg".$identifier."' src='".$cur_webpath."' title='".$cur_alt."' alt='".$cur_alt."'/>";

if($_cap_show_&&isset($$captions)){ //we have to show captions

$html2 .= "\n<div class='".(($_cap_pos_)?'inside':'outside')."' style='width:".$_im_area_."px;'>";

if($cur_cap_set){ //captions (specific or default) are set for this image

$html2 .= "<span>".$cur_cap[0]."</span><span>".$cur_cap[1]."</span>";

}

$html2 .= "\n</div>".(($_cap_pos_)?"":"<br class='vsig_clr' />");

}

if($_link_use_&&isset($$vsiglinks)){ //links are activated and set

$html2 .= "\n</a>";

}

$html2 .= "\n</div>\n";

}

 

The error ocurs because the div tag is between <a> tags (look in the code above)

 

Can you please give me a solution?

 

Thanks

 

Link to comment
https://forums.phpfreaks.com/topic/206099-getting-error-with-validation/
Share on other sites

Show us the HTML output, not the PHP script. The PHP is irrelevant.

 

And make sure you format the HTML output into something readable. Don't just paste a bunch of unformatted code into here.

 

And finally, use code tags.

 

If you want help, you need to make yourself easy to be helped.

    <!-- article-content -->
<div class="art-article">		
<a name='g_vsig1_0'></a><div class='vsig vsig1_0'>
<div class='vsig_top vsig_top1_0'>
<a href='http://www.dates-online.nl/index.php?option=com_sobi2&sobi2Task=sobi2Details&catid=3&sobi2Id=10&Itemid=' title='Adrienne' target='_blank'>
<img id='topimg1_0' src='http://www.dates-online.nl/images/stories/verysimple18-25/vsig_images/adriennegoed_440_352_90.jpg' title='Adrienne' alt='Adrienne'/>
<div class='outside' style='width:440px;'><span></span><span>Wilt u meer weten over bovenstaande single, of met diegene in contact komen? Klik dan hier of op de foto om direct door te gaan naar haar persoonlijke pagina.</span>
</div><br class='vsig_clr' />
</a>
</div>

 

Thats the html code

ok.. can you give me the code?

 

I have to change this code:

 

if($images[$a]['filename']==$images[$aktimg]['filename']) {
$html2 .= "\n<div class='vsig_top vsig_top".$identifier."'>";
if($_link_use_&&isset($$vsiglinks)){ //links are activated and set
$html2 .= "\n<a href='".$cur_link[0]."' title='".$cur_link[1]."' target='".$cur_link[2]."'>";
}
$html2 .= "\n<img id='topimg".$identifier."' src='".$cur_webpath."' title='".$cur_alt."' alt='".$cur_alt."'/>";
if($_cap_show_&&isset($$captions)){ //we have to show captions
$html2 .= "\n<div class='".(($_cap_pos_)?'inside':'outside')."' style='width:".$_im_area_."px;'>";
if($cur_cap_set){ //captions (specific or default) are set for this image
$html2 .= "<span>".$cur_cap[0]."</span><span>".$cur_cap[1]."</span>";
}
$html2 .= "\n</div>".(($_cap_pos_)?"":"<br class='vsig_clr' />");
}
if($_link_use_&&isset($$vsiglinks)){ //links are activated and set
$html2 .= "\n</a>";
}
$html2 .= "\n</div>\n";
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.