990805 Posted June 28, 2010 Share Posted June 28, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/206099-getting-error-with-validation/ Share on other sites More sharing options...
haku Posted June 28, 2010 Share Posted June 28, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/206099-getting-error-with-validation/#findComment-1078493 Share on other sites More sharing options...
990805 Posted June 29, 2010 Author Share Posted June 29, 2010 <!-- 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 Quote Link to comment https://forums.phpfreaks.com/topic/206099-getting-error-with-validation/#findComment-1078701 Share on other sites More sharing options...
haku Posted June 29, 2010 Share Posted June 29, 2010 Remove the divs from inside the <a> tags. Quote Link to comment https://forums.phpfreaks.com/topic/206099-getting-error-with-validation/#findComment-1078714 Share on other sites More sharing options...
990805 Posted June 29, 2010 Author Share Posted June 29, 2010 Then the plugin won't work annymore. I cant see the pictures on the site then... Quote Link to comment https://forums.phpfreaks.com/topic/206099-getting-error-with-validation/#findComment-1078747 Share on other sites More sharing options...
haku Posted June 29, 2010 Share Posted June 29, 2010 Another option you have is to put the <a> tag after everything else inside the div. Then set it to display:block, absolutely position it in the top left corner, and make it the same size as the container. Quote Link to comment https://forums.phpfreaks.com/topic/206099-getting-error-with-validation/#findComment-1078769 Share on other sites More sharing options...
990805 Posted June 29, 2010 Author Share Posted June 29, 2010 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"; } Quote Link to comment https://forums.phpfreaks.com/topic/206099-getting-error-with-validation/#findComment-1078780 Share on other sites More sharing options...
haku Posted June 30, 2010 Share Posted June 30, 2010 I give advice for free. I write code for USD$60/hr. If you really want me to fix your code, send me a PM and we can work out a payment system. Either that, or you can use the advice I gave you and write the code yourself. Quote Link to comment https://forums.phpfreaks.com/topic/206099-getting-error-with-validation/#findComment-1078979 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.