I'm in the process of updating/unobtrusifying my gallery website.

The html for the thumbnail links is generated in PHP from a database.

In javascript I want to disable the thumbnail links' default behaviour and instead open up the hi-res image along with relevant details in a PHP pop-up window.

I need to pass an identifier to popup.php and wondered if it was 'a okay' to add a 'picId' property to my html as follows and then construct a URL something along the lines of 'popup.php?imageId=' + imgLink[x].getAttribute('picId').

  <a href="ASSETS/Hires/Torosaurus.jpg" picId="1">
    <img src="ASSETS/Thumbs/Torosaurus.jpg" alt="Torosaurus"
Is the above idea a bad idea semantically or just a bad idea fullstop.