Page 1 of 1

Still cant POST to a frame

Posted: Fri Jun 21, 2002 7:31 am
by virgil
Hi

I am trying to get a search form(.html) to send its MySQL query results(.php) to a frame in a frame page.

If I use
Code:
<form method="post" action="resultsframe.htm">

I get a (405)Method Not Allowed
The requested method POST is not allowed for the URL /resultsframe.htm. error.

The code below just replaces the search page with the query results in the same original window.

Can I tweek it to make it display the query results in a frame page?

Code: Select all

<form  method="post" action="query.php" target="resultsframe.htm" onSubmit="resultsframe.htm">
The frames page has query.php set as its source(src=query.php).


I thought it might be a logic problem. Like maybe you cant post to a frame itself, you have to post to an actual page. Is there a way to route the post through the frame url to the .php query page url?

Thanks for any advice. Virgil

Posted: Fri Jun 21, 2002 8:31 am
by twigletmac

Posted: Fri Jun 21, 2002 9:49 am
by jason

Code: Select all

<form  method="post" action="query.php" target="resultsframe.htm" onSubmit="resultsframe.htm">
The target needs to be the name of the frame.

Take this for example:

Code: Select all

<frameset  cols="150,*">
    <frame name="leftFrame" src="navigation.php" marginwidth="10" marginheight="10" scrolling="auto" frameborder="1" bordercolor="black">
    <frame name="mainFrame" src="main.php" marginwidth="10" marginheight="10" scrolling="auto" frameborder="1" bordercolor="black">
</frameset>
If I had a form in the leftFrame ("navigation.php"), I would make the form be like this:

Code: Select all

<form  method="post" action="main.php" target="mainFrame">
This would send the data to the main.php in the mainFrame.