interclubs
asked on
Change iFrame width and height on submit.
I have a form as such:
<form action="showPage.php" method="post" target="virtualDisplay">
Width : <input type="text" name="viewWidth" value="" /> x Height: <input type="text" name="viewHeight" value="" />
<button type="submit">try me.</button>
</form>
When the form is submitted, I want to change the height/width of an iframe located on the same page (via JavaScript):
<iframe src ="showPage.php" width="xxxx" height="xxxx" name="virtualDisplay">
<p>Your browser does not support iframes.</p>
</iframe>
Thanks!
<form action="showPage.php" method="post" target="virtualDisplay">
Width : <input type="text" name="viewWidth" value="" /> x Height: <input type="text" name="viewHeight" value="" />
<button type="submit">try me.</button>
</form>
When the form is submitted, I want to change the height/width of an iframe located on the same page (via JavaScript):
<iframe src ="showPage.php" width="xxxx" height="xxxx" name="virtualDisplay">
<p>Your browser does not support iframes.</p>
</iframe>
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Please assign points or close this. If you need more help please state so or Request Attention on this. Thanks
See link: http://www.guymal.com/mycode/iframe_size/