Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/149948-solved-validation-problem/
Share on other sites

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.

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.