mark110384 Posted March 18, 2009 Share Posted March 18, 2009 Hey guys I'm goin through my work website and validating it, below is the url of a validation for one of the pages. I am having a problem the 2 close tags that the validator say are not open, one </a> and </p>, if I remove them it has an effect on the scrollable right icon button and places the hit area above the button, this only occurs in FireFox. It validates when the tags are removed but the it causes the problem in FF. http://validator.w3.org/check?uri=http%3A%2F%2Fwww.lilleyandgillie.co.uk%2F2009%2Fproducts%2Fview_item.php%3Fitem_selected%3Ddualhead&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.606 The coding is as follows <script type="text/javascript"> sts_bs("jwscroller2e8e",[20080623,"images/","","blank.gif",6,0,0,5,"100%","center",3,3,150,150,1,0,0,0,0,2000,1,12,2,"stEffect(\"scroll(Rate=24,enabled=0,Duration=0.80)\")",-2,30],["solid",1,"#999999","#FFFFFF","","repeat"]); sts_sca(["center","middle","center","middle"],["arrow03_lt.gif","arrow03_lt.gif","arrow03_ld.gif",22,18,"arrow03_rt.gif","arrow03_rt.gif","arrow03_rd.gif",22,18]); sts_tbd([0], ["solid",1,"#E6EFF9"]); </script> <?php //Php to populate the item scroller $sql = "SELECT * FROM item_details ORDER BY sts_id"; $result = mysql_query($sql) or die ("Data not found"); while ($myrow = mysql_fetch_array($result)) { $image = $myrow['item_thumb_url']; $stsid = $myrow['sts_id']; $item_no = $myrow['item_no']; $item_name = $myrow['item_short_name']; $item_desc = $myrow['item_desc']; $item_code = $myrow['item_Code']; $space = ' '; ?> <script type="text/javascript"> sts_ai("i<?php $stsid; ?>",[1,"<p align=\"center\"><a class=\"page_content_link\" href=\"<?php echo "view_item.php?item_selected=$item_code"; ?>\"><?php echo $item_no; ?> - <?php echo $item_name; ?></a></p>","","_self","<?php echo $image; ?>",130,130,"center"],["transparent","8pt Arial","#000000","none","8pt Arial","#000000","none"]); </script> <? } ?> <script type="text/javascript"> sts_es(); </script> Thanks Quote Link to comment https://forums.phpfreaks.com/topic/149948-solved-validation-problem/ Share on other sites More sharing options...
mark110384 Posted March 19, 2009 Author Share Posted March 19, 2009 Bump* Quote Link to comment https://forums.phpfreaks.com/topic/149948-solved-validation-problem/#findComment-788310 Share on other sites More sharing options...
mark110384 Posted March 20, 2009 Author Share Posted March 20, 2009 Bump* Quote Link to comment https://forums.phpfreaks.com/topic/149948-solved-validation-problem/#findComment-789249 Share on other sites More sharing options...
mark110384 Posted March 20, 2009 Author Share Posted March 20, 2009 Has anyone got a clue why it's kicking back with the vaidation error? end tag for element "P" which is not open. and end tag for element "A" which is not open. when it is quite clearly open Quote Link to comment https://forums.phpfreaks.com/topic/149948-solved-validation-problem/#findComment-789320 Share on other sites More sharing options...
mark110384 Posted March 20, 2009 Author Share Posted March 20, 2009 I removed the <p> and that fot rid of 52 of the errors but there is still 52 errors from the <a> tag, I changed the coding so I put the php into js variables like so <script type="text/javascript"> var item_code = "<? echo $item_code; ?>"; var item_number = "<? echo $item_no; ?>"; var item_name = "<? echo $item_name; ?>"; sts_ai("i<?php $stsid; ?>",[1, '<a href=\"view_item.php?item_selected=' + item_code + '\" class=\"page_content_link\">' + item_number + " - " + item_name + '</a>',"","_self","<?php echo $image; ?>",130,130,"center"],["transparent","8pt Arial","#000000","none","8pt Arial","#000000","none"]); </script> But it has made no change and it still comes up with the same error end tag for element "A" which is not open. the validation can be found at http://validator.w3.org/check?uri=http%3A%2F%2Fwww.lilleyandgillie.co.uk%2F2009%2Fproducts%2Ftotaltide.php%3Fitem_selected%3Dtotaltide&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.606 any ideas, I'm stumped. Quote Link to comment https://forums.phpfreaks.com/topic/149948-solved-validation-problem/#findComment-789520 Share on other sites More sharing options...
darkfreaks Posted March 20, 2009 Share Posted March 20, 2009 why not just revalidate it with the option to clean up in HTML Tidy it outputs the fixed code Quote Link to comment https://forums.phpfreaks.com/topic/149948-solved-validation-problem/#findComment-789525 Share on other sites More sharing options...
mark110384 Posted March 20, 2009 Author Share Posted March 20, 2009 Doh, nice one, I forgot about that, turns out that it should have been <\/a> instead of </a> Quote Link to comment https://forums.phpfreaks.com/topic/149948-solved-validation-problem/#findComment-789541 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.