Dynamically Loaded text opens lightbox Modal?

I am racking my brain over here trying to figure out if it is at all possible to do the following:
Bare with me - I’m relatively new to web development.
First, I have my client updating his site through a form type submission. The fills out the form, PHP parses the info to a crude HTML formatted text file that is then dynamically loaded into flash. He enters his info for the link in the form which creates a hyperlink at the bottom of the submission. I want this link (image of product) to open in a lightbox modal window.
I’m beginning to think that this isn’t possible because of the scripts that need to be contained in the HTML where the link is stored. Right? Does that even make sense? Is there any type of workaround? I envisioned this working and being relatively easy. I can’t let go of it now that I saw it in my head but I’m going in circles. ■■■■ BRAIN!

Please help!