That Code tag is not the best
I must not be using it right, or notepad ++ doesn't copy right. Here's the code in more readable form:
<h3>Featured product updater for Vivian's feature spotlighting delight.</h3>
<table width="538">
<tr>
<td width="25%" align="center">
SKU
</td>
<td width="50%" align="center">
Description
</td>
<td width="vendor" width="25" align="center">
Vendor
</td>
</tr>
<? if ($features != 0) : ?> <!--I'm sure we can just use the variable as an array or a number without recasting-->
<? foreach ($features as $feature) : ?>
<tr>
<td align="left">
<?=$feature['sku'] ?>
</td>
<td align="left">
<?=$feature['name'] ?>
</td>
<td align="left">
<?=$feature['vendor'] ?>
</td>
</tr>
<?endforeach?>
<? else :?>
<tr>
<td colspan="3">
The table is empty
</td>
</tr>
<? endif ?>
</table>
<hr />
<form method="post" name="Haskins" action="<?=$full_url?>">
<span id="test">sku: </span><input type="text" size="10" maxlength="40" name="sku"><br />
<input type="submit" value="Submit" name="send">
<input type="submit" value="Clear list" name="clear">
</form>
<script type="text/javscript">
window.onload=init;
function init(){
alert ("This boy is working");
document.Haskins.sku.focus();
}
</script>
four days and 108 views later...
Well, after beating my head against the wall for five days and reading books everywhere, I've figured out how to make an html page locally to test code in stead of uploading all the time. I've tried firebug, which is quite handy. I've even reduced it to the smallest item possible, but still can't seem to get it to work.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0074)http://www.scrapbookingsuppliesrus.com/?admin=catalog&layer=feature_update -->
<HTML><HEAD><TITLE>Administration - Catalog</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK
</HEAD>
<BODY >
<FORM name=Haskins
action=http://www.scrapbookingsuppliesrus.com/?admin=catalog&layer=feature_update
method=post><SPAN id=test>sku: </SPAN><INPUT maxLength=40 size=10
name=sku><BR><INPUT type=submit value=Submit name=send> <INPUT type=submit value="Clear list" name=clear> </FORM>
<SCRIPT type=text/javscript>
window.onload=function(){
alert ("This boy is working");
document.Haskins.sku.focus();
}
</SCRIPT>
</BODY></HTML>
But then, just as I was about to hit the submit reply button, I figured it out. As you can see from my earlier posts, I misspelled javascript in the tag. I can't believe it...