dear all
how can i use the frameset with drop down menu
i have a drop down menu have some elemnets when i choose an element
show it's page without refresh
frameset
Moderator: General Moderators
Re: frameset
This is simple HTML, just set the target of the form to the name of the frame you wish to change.
mypage.php
Code: Select all
<form target="myframe" method="post" action="mypage.php">
<select name="page">
<option value="1">Page 1</option>
<option value="2">Page 2</option>
</select>
<input type="submit" name="submit" value="Change page" />
</form>Code: Select all
<?php
switch($_POST['page']){
case(1):
header("Location: page1.php");
break;
case(2):
header("Location: page2.php");
break;
default:
header("Location: default_page.php");
}
exit();
?>Re: frameset
thx for help
but wht is wrong
i have page name t1.html
and page name mypage.php
when i run t1.html
it open the choosing in new window
i want to open in same window without refresh
but wht is wrong
i have page name t1.html
Code: Select all
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form target="myframe" method="post" action="mypage.php">
<select name="page">
<option value="1">Page 1</option>
<option value="2">Page 2</option>
</select>
<input type="submit" name="submit" value="Change page" />
</form>
</body>
</html>
and page name mypage.php
Code: Select all
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
switch($_POST['page']){
case(1):
header("Location: page1.php");
break;
case(2):
header("Location: page2.php");
break;
default:
header("Location: default_page.php");
}
exit();
?>
</body>
</html>
it open the choosing in new window
i want to open in same window without refresh
Last edited by Benjamin on Sat Jun 06, 2009 1:35 pm, edited 1 time in total.
Reason: Added [code=php] tags.
Reason: Added [code=php] tags.
Re: frameset
here is what i want
but using combo with frameset not div
http://www.dynamicdrive.com/dynamicinde ... viewer.htm
but using combo with frameset not div
http://www.dynamicdrive.com/dynamicinde ... viewer.htm
Re: frameset
I did stress you need to sue a frame or iframe. I assumed you'd put that code in yourself as you were asking for the PHP