You can't to do that using javascript and HTML alone due to security restrictions in all modern browsers prohibiting the cross domain sharing of information about frames and iframes. If it were not, this is how you would do it. First, you would give the iframe a name:
Code:
document.write('<iframe name="dynframe" id="dynstuff" src="" '+iframeprops+'></iframe>')
You would have to make sure that name isn't used by anything else on the page. Next, you would modify your call for your image button:
Code:
onclick="window.location.href=window.frames['dynframe'].location.href;"
But, as I say, this will be a security violation and therefore prohibited. There may be some type of server side work around to the violation but, that is beyond the scope of my knowledge and would depend upon what (if any) server side languages you have available to you.
Bookmarks