![]() |
|
|
#1
|
|||
|
|||
|
Hi
Not sure if this is the correct thread to post this in but here goes. I am trying to validate a website and have come stuck with a piece of code Code:
<script language="javascript" type="text/javascript"><!--
document.write('<a href="javascript:popupImage(\'<?php echo $extraImagePopupURL; ?>\',\'<?php echo $extraImagePopupHeight; ?>\',\'<?php echo $extraImagePopupWidth; ?>\');"><?php echo $extraImagePopupImage; ?><br /><span class="enlarge"><?php echo $extraImageURLText; ?></span></a>');
//--></script>
Any pointers greatly appreciated Thanks Mike |
|
#2
|
|||
|
|||
|
* W3 validator shouldn't even see your PHP code.
* Why do you even need document.write if you have PHP and pass static values to document.write? * Don't aleternate quotes in JS - it's confusing and will lead to errors. Just quote the inner quotes (e.g. document.write("<a href=\"link\">anchor</a>");) * It will be less code if you use <?= ?> instead of echo (e.g. <?= $extraImagePopupURL ?>) J.D. |
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How long is a piece of string? | Lucky Bastard | Directories | 7 | Jun 16th 2005 6:37 am |
| Another piece of the jigsaw. | Michael | Yahoo | 5 | May 17th 2005 8:53 am |
| Another site not validating since script update. | neterslandreau | Setup / Validation Help | 7 | Apr 3rd 2005 12:10 pm |
| Script for auto-validating many pages | miko67 | PHP | 4 | Apr 3rd 2005 8:30 am |
| Script for checking / validating recip links? | Starbug | Link Development | 13 | Mar 5th 2005 11:22 am |