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 6 of 6
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    67
    Thanks
    18
    Thanked 0 Times in 0 Posts

    basics I can't seem to get

    i have a basic form that i want a pop box to come up saying thank you you request has been submited. how do i get that into this?
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>email addresses for specials</title>

    <form action="gdform.asp" method="post">
    <p align="center">
    <input type="hidden" name="subject" value="email address for specials">
    <input type="hidden" name="redirect" value="INDEX.HTM">
    </p>
    <p align="center">
    <input type= "hidden" name= "text" value="please sent me emails of the specials">
    <input type="text" name="email">
    </p>
    <p align="center">
    <input type="submit" name="Submit" value="SUBMIT" />
    <input type="reset" name="reset" value="RESET" />
    </p>
    </form>

  • #2
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    Code:
    <script type="text/javascript">
    window.onload=function()
    {document.forms[0].onsubmit=function()
    {alert('Thank you. Your request has been submitted');}}
    </script>
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • #3
    New Coder
    Join Date
    Jun 2008
    Posts
    67
    Thanks
    18
    Thanked 0 Times in 0 Posts
    do i put that before the action or in the middle of it?

  • #4
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    You can put it in the <head> or <body> section of your page. Ideal is in the <head>.
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • Users who have thanked rangana for this post:

    howardfan123 (07-11-2008)

  • #5
    New Coder
    Join Date
    Jun 2008
    Posts
    67
    Thanks
    18
    Thanked 0 Times in 0 Posts
    Is that going to stop my form from redirecting to my home page or will it do both

  • #6
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    It will show a message saying "Thank You. Your request has been submitted", then submits your form. Nothing more, nothing less.
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph


  •  

    Posting Permissions

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