|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Frame help
on the bottom frame is menu.html
Code:
<body><form action='link.php' method='post' name='changer'> <label>URL <input type="text" name="url" /> </label> <label> <input type="submit" name="Submit" value="Submit" /> </label> </form> </body> on the top frame is link.php Code:
<?php
if (isset($_POST['url'])) {
header("Location: " . $_POST['url']);
}
?>
the problem is when i enter a url in menu.html and submit, i want link.php to go to that webpage. whats the best way to do this?... the above isn't working the way i intended. |
|
#2
|
|||
|
|||
|
This is an HTML issue, should be in client side things, but all you need to do is give the link.php frame a name:
<frame src="link.php" name="link_frame" /> then on the link(s) on the menu.html page, set the target equal to the frame's name: <a href='www.google.com' target='link_frame'>Go to google</a> That oughta do it for ya.
__________________
Sir, a desire of knowledge is the natural feeling of mankind; and every human being, whose mind is not debauched, will be willing to give all that he has to get knowledge. |
|
#3
|
|||
|
|||
|
thx for help but its not working...
i want it to work like a browser.. the bottom frame i type the url then submit... and the top frame goes to that website. |
|
#4
|
|||
|
|||
|
Post what you have now, including top frame, bottom frame and the frameset page
|
|
#5
|
|||
|
|||
|
frameset page
Code:
<HTML>
<HEAD>
<TITLE>Stack Crawl</TITLE>
</HEAD>
<FRAMESET ROWS="80%,*" cols="*" >
<FRAME SRC="link.php" name="link_frame">
<FRAME SRC="menu.html">
</FRAMESET>
<noframes></noframes>
</HTML>
input page bottom frame Code:
<body><form action='link.php' method='post' name='changer'> <label>URL <input type="text" name="url" /> </label> <label> <input type="submit" name="Submit" value="Submit" /> </label> </form> </body> link page top frame Code:
<?php
if (isset($_POST['url'])) {
header("Location: " . $_POST['url']);
}
?>
i tried your code but its not exactly what i'm looking for.. i have it sort of working with this. but it changes the bottom frame.. when it should change the top.. |
|
#6
|
|||
|
|||
|
You can use the target attribute with form tags too, change:
<body><form action='link.php' method='post' name='changer'> to: <body><form action='link.php' method='post' name='changer' target='link_frame'> And you should be good. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Frame help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|