How to dynamically generate href and refresh iframe using jquery

On a page i have a image thumbnail and a ifarme where i am showing the full size image.In the iframe i am showing a html page with viewer.

on click of
<a class="dvlink" ><img src="../" /></a> [this is the thumbnail image]

i want to dynamically do two things,
1. refresh iframe
2. As the iframe is refreshed, i want to pass a 'input' variable to html form within iframe, thus want to dynamically create href
eg: href="../../index.html?"

href="the html page path+the path of full image coressponding to tumbnail image clicked"