How you get the user's ID number will be up to you to figure out, as will figuring out how to dynamically write the hyperlinks in your html page.
Put the items script inside a function, then use a javascript onclick event handler to call the function and pass the user's ID number (solditagain) as a variable in the hyperlink.
confused?
Here's one way to do it using the document.write method:
Code:
<script language="JavaScript" type="text/javascript">
<!--//
function viewItems(solditagain){
var myID="solditagain";document.write("<scri"+"pt language='"+"JavaScript' "+"sr"+"c=\"http://lapi.ebay.com/ws/eBayISAPI.dll?EKServer&paypal=y&popup=y&hdrcolor=ffffff&fs=1&endcolor=ee4444&num=30&cid=0&sortdir=asc&tlecolor=ffcc00&sortby=endtime&track=&srchdesc=n&width=600&siteid=0&bdrcolor=ffffff&logo=1&numbid=y&ai=tedsaodd&prvd=0&fntcolor=000000&sort=MetaEndSort&si="+myID+"&endtime=y&title=Current+listings+for+"+myID+"&img=y\" ebay=\"http:\/\/include.ebaystatic.com\/\"></scr"+"ipt>");
}
//-->
</script>
Here's the hyperlink you'd use:
HTML Code:
<a href="#" onclick="viewItems('you have to put the id number here');return false;">View Bob's Items</a>
This will work in Google Chrome, IE6/IE7, Netscape, Opera, Firefox and Safari.
There are those that would recommend using proper DOM (Document Object Model) methods to do this. In this case you get what you paid for. The rest is up to you.
Good Luck.