Easy. The PHP solution is just to put a "if" statement before echoing the IFRAME code.
<?php
if ($_POST["stockSymbol"])
echo "<iframe id=stockframe src='http://www.bing.com/search?q=" .
$_POST["stockSymbol"] . "'></iframe>";
?>
The JavaScript version is a little more complex as you will need todo some browser testing.
Last time I did this, I made the IFRAME height = 0 when the page was served, and then when you click the button, you set the height value and bingo it pops up.
I remember having issues with different browsers. You can also try the "visible" attribute, but again, you might have browser issues.
As this is a PHP forums, go with the PHP solution. Easy. But, there is plenty of sample code around the place:
http://www.webdeveloper.com/forum/showthread.php?t=74026
I really prefer the PHP version, because then you can monitor what people are searching for and provide user features.