Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Apr 2004
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts

    "Method Not Allowed"

    Method Not Allowed
    The requested method POST is not allowed for the URL /new-vulcan/test/end3.html.

    why would I get this message?

    I'm sure it's been answered a million times, but I couldn't find it in the forum, I'm new to javaseript, so I scabbed some code from the forum which worked when I viewed it but when I mixed in my rewrite I get this message.

    here's what I'm trying to do:
    --open a popup window,
    --get the drop down(select form) to pass the data back to the parent on submit,

    should be easy right?

    here's the code: --if it looks fimilar I grabbed it from a previous thread ---
    parent page:

    function openIt()
    {
    window.open('end3.html','','width=300,height=550,left=200, top=200,status=0');
    }

    -----------------
    <form name="mainForm" method="post" action=../cgi/email-form.cgi>
    <input type=hidden name=Product value="Display Springs">

    <td width="265" class="form-text">4. <span style="cursorointer" class="main-text-link" onclick="openIt()">
    Select the end detail:</span></td>
    <td>
    <SELECT id=select28 NAME="endDetail">
    <OPTION VALUE=A SELECTED>A
    <OPTION VALUE=B>B
    <OPTION VALUE=C>C
    <OPTION VALUE=D>D
    <OPTION VALUE=E>E
    <OPTION VALUE=F>F
    <OPTION VALUE=G>G
    <OPTION VALUE=H>H
    <OPTION VALUE=I>I </SELECT></FORM></td>


    popup page:

    function sendBack()
    {
    if (opener && !opener.closed) //make sure main window is there
    {
    var mainForm = opener.document.mainForm; //save typing!
    /* two simple assignments */
    /* move data from here to there */
    mainForm.endDetail.select = document.displayend.product.select;

    }
    }

    ------------

    <form name="displayend" method="post" action="" onsubmit="sendBack();self.close()">
    <span class="solution-title"> Select End Detail then click Submit:</span>
    <SELECT NAME= "product">

    <OPTION VALUE=A SELECTED>A </option>
    <OPTION VALUE=B>B </option>
    <OPTION VALUE=C>C </option>
    <OPTION VALUE=D>D </option>
    <OPTION VALUE=E>E </option>
    <OPTION VALUE=F>F </option>
    <OPTION VALUE=G>G </option>
    <OPTION VALUE=H>H </option>
    <OPTION VALUE=I>I </option> </SELECT>
    <br>
    <input type="submit" name="submit" value="Submit">

    </form>

    ---------

    sorry to dump the code, but I figured it would save a step, any help or direction would be great.

    Thanks
    Ken

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Change this line (add the red text):

    Code:
    <form name="displayend" method="post" action="" onsubmit="sendBack();self.close();return false;">
    The "return false" will stop the popup from posting since the goal isn't posting the form for processing, it's returning the value to the main page.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #3
    New Coder
    Join Date
    Apr 2004
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the error message is gone, but nothing is being sent or the main pg isn't reading the selected value from the pop-up.

    any guesses why?


    never mind I got it
    Last edited by kred; 05-06-2004 at 11:04 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •