Problem with redirection in a Form...

Discussion in 'ASP General' started by Calvin, Jul 15, 2003.

  1. Calvin

    Calvin Guest

    Hi,

    Envronment: IIS 5 on W2k sp3

    Problem: I'm using a Form and when Submitted, will display
    a confirmation page. The confirmation page is simply a
    Form with an OK button. I want the browser to display
    either [1] the first form OR [2] to another page and I
    couldn't do either.

    Here's what I have problem with:
    For [2], I got the error
    HTTP 405 - Resource not allowed
    Internet Information Services
    although the page can be displayed if I paste the URL in
    the browser's address!
    I tried using BOTH:
    <input type="submit" value="OK"
    OnClick="javascript:window.location('thanks.htm')">
    and specifying thanks.htm in the ACTION of the Form.

    For [1]: I couldn't get back to the original form with:
    <input type="submit" value="OK"
    OnClick="javascript:window.top.history.back()">

    Any ideas will be greatly appreciated, thnx!
    Calvin
    Calvin, Jul 15, 2003
    #1
    1. Advertising

  2. Calvin

    Ray at Guest

    I don't understand why you're using javascript to change the page location
    on submit buttons. Don't you want the form to submit? Just have the form
    submit and use Response.Redirect "thanks.htm" in ASP code. Or am I not
    understanding something you're trying to do?

    Ray at home





    "Calvin" <> wrote in message
    news:054b01c34a66$e50f4a50$...
    > Hi,
    >
    > Envronment: IIS 5 on W2k sp3
    >
    > Problem: I'm using a Form and when Submitted, will display
    > a confirmation page. The confirmation page is simply a
    > Form with an OK button. I want the browser to display
    > either [1] the first form OR [2] to another page and I
    > couldn't do either.
    >
    > Here's what I have problem with:
    > For [2], I got the error
    > HTTP 405 - Resource not allowed
    > Internet Information Services
    > although the page can be displayed if I paste the URL in
    > the browser's address!
    > I tried using BOTH:
    > <input type="submit" value="OK"
    > OnClick="javascript:window.location('thanks.htm')">
    > and specifying thanks.htm in the ACTION of the Form.
    >
    > For [1]: I couldn't get back to the original form with:
    > <input type="submit" value="OK"
    > OnClick="javascript:window.top.history.back()">
    >
    > Any ideas will be greatly appreciated, thnx!
    > Calvin
    Ray at, Jul 15, 2003
    #2
    1. Advertising

  3. Calvin

    MDW Guest

    If all you want is for the address to change when you
    click on the button (and not actually submit any form data
    to an ASP page), then try

    <inuput type="button" onClick="....">
    >-----Original Message-----
    >Hi,
    >
    >Envronment: IIS 5 on W2k sp3
    >
    >Problem: I'm using a Form and when Submitted, will

    display
    >a confirmation page. The confirmation page is simply a
    >Form with an OK button. I want the browser to display
    >either [1] the first form OR [2] to another page and I
    >couldn't do either.
    >
    >Here's what I have problem with:
    >For [2], I got the error
    > HTTP 405 - Resource not allowed
    > Internet Information Services
    >although the page can be displayed if I paste the URL in
    >the browser's address!
    >I tried using BOTH:
    ><input type="submit" value="OK"
    >OnClick="javascript:window.location('thanks.htm')">
    >and specifying thanks.htm in the ACTION of the Form.
    >
    >For [1]: I couldn't get back to the original form with:
    ><input type="submit" value="OK"
    >OnClick="javascript:window.top.history.back()">
    >
    >Any ideas will be greatly appreciated, thnx!
    >Calvin
    >.
    >
    MDW, Jul 15, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Munna

    Passport Redirection Problem.

    Munna, Jul 10, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    402
    =?Utf-8?B?Tkhhcnk=?=
    Jul 14, 2004
  2. Jack

    form redirection

    Jack, Apr 7, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    431
    Pradeep Sabharwal
    Apr 7, 2005
  3. graphicsxp

    redirection with form authentication

    graphicsxp, Jun 1, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    297
  4. xman

    redirection on the form button?

    xman, Apr 1, 2005, in forum: Javascript
    Replies:
    8
    Views:
    109
  5. Hongyu
    Replies:
    2
    Views:
    133
Loading...

Share This Page