1.html
<form id="abc" method="post" action="navigate.php">
<input type="radio" name="nav" value="a1" /> A 1
<input type="radio" name="nav" value="a2" /> A 2
<input type="radio" name="nav" value="b1" /> B 1
<input type="radio" name="nav" value="b2" /> B 2
<input type="radio" name="nav" value="c1" /> C 1
<input type="radio" name="nav" value="c2" /> C 2
<input type="submit" name="submit" value="Go" />
</form>
navigate.php
<?
if ($_POST['nav']==a2) {
echo "<meta http-equiv=\"refresh\" content=\"0;URL=page_1.php\">";} ?>
2.html
<iframe src="1.html"/>
When i select a2 and press go it goes to page_1.php but inside the frame. I want the main window to go to page_1.php. Is there any solution for this??
You can use the target attribute of the form tag to determine the frame/window the submit should be targetting to. In you case use target=”_top” to open the result in the top frame (the main window)
The problem is that it will open in the top frame (the window) in all cases, so independent of what you choose as a value for the radio button.