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 to the CF scene
    Join Date
    Aug 2002
    Location
    Vietnam
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    onSubmit for a form

    What I'm trying to do is this:
    After a user click on Submit button, they will be lead to another page. And here goes mine, but it doesn't work, please point out to me the mistakes:
    <script language=javascript>
    function success()
    {
    window.location="newpage.htm";}
    </script>
    <form method=some_method name=some_name onSubmit="success();" >
    <input type=textarea >
    <input type=submit value=go >
    </form>

    certainly I use a ready-made cgi file to send info, but what I need is loading the newpage.htm into the window.
    Please help me with that basic thing to you but complicated to me.

  • #2
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    I don't understand exactly what you are trying to do. Do you want to submit the form in the same window, and then pop up a new window?

    You can specify a target and post your form to a new window, if that helps.

    <form method="GET" name="formname" target="_blank" action="processing.pl">

  • #3
    New to the CF scene
    Join Date
    Aug 2002
    Location
    Vietnam
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No, the new page should be loaded in the same window, I mean I want to load the new page clientside-ly, not serversidely.


  •  

    Posting Permissions

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