Results 1 to 4 of 4

Thread: New enquiry script

  1. #1
    Join Date
    Apr 2008
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default New enquiry script

    I want to add a script on to my website that enables new enquires to submit an enquiry.

    i'v set up the forms but need to some help in implementing.

    this is the page i have set up http://www.bioenergyhealing.org.uk/ask_a_question

    thanks

    michael

  2. #2
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    This isn't something you can do with JavaScript, you need a server side language such as PHP to process the form.

    You can however do validation with JavaScript which is always useful.

  3. #3
    Join Date
    Apr 2008
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks, i v just listed my thread in php

  4. #4
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    If you do want some validation methods anyway you could do something like this to the onclick event:

    Code:
    <head>
    <script type="text/javascript">
    <!--
    function checkForm()
    {
    if (getElementById('T1').value == "")
       {
            alert("Please input your name");
            return false;
       }
    
    }
    -->
    </script>
    </head>
    
    <body>
    First Name: <input type="text" name="T1" id="T1" size="29">
    
    <input type"button" name="Submit" id="Submit" onclick="checkForm();" value="Send Email">
    </body>
    Something like that to save some time for PHP by not sending a form with nothing on it.

Bookmarks

Posting Permissions

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